// functions and variables for switching CSS styles var ssRegions = 10; var ssThemes = 20; var cssBodyRegions = "Regions"; var cssBodyThemes = "Themes"; var cssBodyStatsRegions = "statsRegions"; var cssBodyStatsThemes = "statsThemes"; var xmlHttpSection = null; function setSection(toSection) { var url = "setsection.php"; xmlHttpSection = GetXmlHttpObject( handleResult ); if ( xmlHttpSection != null ) { xmlHttpSection.open("POST", url , false); xmlHttpSection.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttpSection.send('s=' + toSection ); } } function handleResult() { var result; if (xmlHttpSection.readyState==4 || xmlHttpSection.readyState=="complete") { result = xmlHttpSection.responseText; } //alert(result); } function setBodyClass() { if (parent.sitesection == ssRegions) { document.getElementsByTagName('body')[0].className = cssBodyRegions; } else if (parent.sitesection == ssThemes) { document.getElementsByTagName('body')[0].className = cssBodyThemes; } } function switchMenuBody(toCss) { setSection(toCss); if (toCss == ssRegions) { document.getElementsByTagName('body')[0].className = cssBodyRegions; document.getElementById('miRegions').onclick = function() {parent.main.location='main.php';}; document.getElementById('miThemes').onclick = function() {switchMenuBody(ssThemes); parent.stats.switchStatsBody(ssThemes);}; document.getElementById('miOverview').onclick = function() {parent.main.location='regions.php';}; } else if (toCss == ssThemes) { document.getElementsByTagName('body')[0].className = cssBodyThemes; document.getElementById('miRegions').onclick = function() {switchMenuBody(ssRegions); parent.stats.switchStatsBody(ssRegions);}; document.getElementById('miThemes').onclick = function() {parent.main.location='main.php';}; document.getElementById('miOverview').onclick = function() {parent.main.location='themes.php';}; } // parent.main.location='main.php'; } function switchStatsBody(toCss) { var body = document.getElementsByTagName("body")[0]; var imgPlayerCount = document.getElementById("imgPlayerCount"); var imgLogin = document.getElementById("imgLogin"); if (toCss == ssRegions) { body.className = cssBodyStatsRegions; if (imgPlayerCount.tagName == "SPAN") imgPlayerCount.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://www.fotovinder.nl/images/fadetoright.png\', sizingMethod='scale');"; else imgPlayerCount.src="images/fadetoright.png"; if (imgLogin.tagName == "SPAN") imgLogin.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://www.fotovinder.nl/images/fadetoright.png\', sizingMethod='scale');"; else imgLogin.src="images/fadetoright.png"; } else if (toCss == ssThemes) { body.className = cssBodyStatsThemes; if (imgPlayerCount.tagName == "SPAN") imgPlayerCount.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://www.fotovinder.nl/images/fadetorightthemes.png\', sizingMethod='scale');"; else imgPlayerCount.src = "images/fadetorightthemes.png"; if (imgLogin.tagName == "SPAN") imgLogin.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://www.fotovinder.nl/images/fadetorightthemes.png\', sizingMethod='scale');"; else imgLogin.src="images/fadetorightthemes.png"; } } function setShoutboxBody(toCss) { if (toCss == ssRegions) { document.getElementsByTagName('body')[0].className = cssBodyRegions; } else if (toCss == ssThemes) { document.getElementsByTagName('body')[0].className = cssBodyThemes; } }