//highscores
//alert(highscores);
function addFlashHere(thisfile, height){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"'); 
document.write('width="735" height="');
document.write (height);
document.write ('" id="');
document.write (thisfile);
document.write ('" align="top">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="/flash/' + thisfile + '.swf" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="bgcolor" value="#000000" />');
document.write('<embed src="/flash/'); 
document.write(thisfile);
document.write('.swf"'); 
document.write('quality="high" bgcolor="#000000"'); 
document.write('width="735" height="');
document.write(height);
document.write ('" name="');
document.write (thisfile);
document.write('" align="top" allowScriptAccess="sameDomain" ');
document.write('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}

function addFlash(thisfile, height){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"'); 
document.write('width="735" height="');
document.write (height);
document.write ('" id="mainFlash" align="top">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="/flash/' + thisfile + '.swf?');
document.write (highscores);
document.write ('" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="bgcolor" value="#000000" />');
document.write('<embed src="/flash/'); 
document.write(thisfile);
document.write('.swf?');
document.write (highscores); 
document.write('" quality="high" bgcolor="#000000"'); 
document.write('width="735" height="');
document.write(height);
document.write('" name="mainFlash" align="top" allowScriptAccess="sameDomain" ');
document.write('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}
function callActionTag() {
	document.getElementById("actionTag_Image").src="http://switch.atdmt.com/jaction/mrkcst_SYNTECViewTortureTestPage_1";
	if (window.location.href.search('-stg') != -1){
	alert('TESTING action tag being pulled from ' + document.getElementById("actionTag_Image").src);
	}
	if (window.location.href.search('-dev') != -1){
	alert('TESTING action tag being pulled from ' + document.getElementById("actionTag_Image").src);
	}
	if (window.location.href.search('localhost') != -1){
	alert('TESTING action tag being pulled from ' + document.getElementById("actionTag_Image").src);
	}
}

function callWebTrendsTag(filename) {
	//alert('NO ALARM... This alert is temporary I am testing an tracking callWebTrendsTag');
	//alert(filename);
	document.getElementById("webTrendsTag_Iframe").src=filename;
	if (window.location.href.search('-stg') != -1){
	alert('Tag set, webtrends page view  ' + document.getElementById('webTrendsTag_Iframe').src);
	}
	if (window.location.href.search('-dev') != -1){
	alert('Tag set, webtrends page view  ' + document.getElementById('webTrendsTag_Iframe').src);
	}
	if (window.location.href.search('localhost') != -1){
	alert('Tag set, webtrends page view  ' + document.getElementById('webTrendsTag_Iframe').src);
	}
}

function OpenApp(page)
        {
            var browserName=navigator.appName; 

           
            
           // if(browserName == "Netscape")
                top.window.top.window.open(page,'PowerAuction','toolbar=no,status=no,resizable=yes,menubar=no,scrollbars=yes,fullscreen=yes');

        }
        
                function OpenAppPD(page)
        {
            var browserName=navigator.appName; 

            
            
           // if(browserName == "Netscape")
                top.window.top.window.open(page,'PowerAuction','toolbar=no,status=no,resizable=yes,menubar=no,scrollbars=yes,fullscreen=yes');

        }
        
                        function OpenAppHowTo(page)
        {
            var browserName=navigator.appName; 

            
            
           // if(browserName == "Netscape")
                top.window.top.window.open(page,'PowerAuction','toolbar=no,status=no,resizable=no,menubar=no,scrollbars=yes,height=400,width=730');

        }
        
        
        function OpenRegistration()
        {
            
            OpenAppPD("http://www.castrolpowerplayerauction.com/Default.aspx");
        }
        
        function OpenLogin()
        {
           
            OpenAppPD("http://www.castrolpowerplayerauction.com/Login.aspx");
        }
        
        function OpenHowToPlay()
        {
            
            OpenAppHowTo("http://www.castrolpowerplayerauction.com/StandAlones/HowTo.aspx");
        }
        
        function OpenRules()
        {
            
            OpenAppHowTo("http://www.castrolpowerplayerauction.com/StandAlones/Rules.aspx");
           
        }