
function launch_game1(){
	//game1Window = window.open("http://www.sonofdork.com/game/outtaloserville/","game1Window","")
	game1Window = window.open("http://www.sonofdork.com/game/outtaloserville/","game1Window","toolbars=no,address=no,left=50,top=50,status=yes,width=710,height=500,scrollbars=no,resizable=no")
}
function ENTRANCE_POPUP(){
	POPUPWindow = window.open("http://217.154.142.20/videos/index-new.php?action=Flash&id=H10728Q10776W10740M10776","POPUPWindow","")
}
function FAN_GALLERY_UPLOAD(em){
	FAN_GALLERY_UPLOADWindow = window.open("fangallery_upload.php"+em,"FAN_GALLERY_UPLOADWindow","toolbars=no,address=no,left=10,top=10,status=yes,width=468,height=400,scrollbars=yes,resizable=no")
}
function STORE(){
	STOREWindow = window.open("about:_blank","STOREWindow","toolbars=no,address=no,left=10,top=10,status=yes,width=468,height=400,scrollbars=yes,resizable=no")
}
function MESSAGE_BOARD(){
	MESSAGE_BOARDWindow = window.open("http://bb01.mer.uk.vvhp.net/sonofdorks/yabb.pl")
}
function STREET_TEAM(){
	STREET_TEAMWindow = window.open("http://www.sonofdork.com/signup/","STREET_TEAMWindow","")
}
function MOBILE_REALTONE(){
	MOBILE_REALTONEWindow = window.open("mobile_realtone.html","MOBILE_REALTONEWindow","toolbars=no,address=no,left=10,top=10,status=yes,width=320,height=300,scrollbars=yes,resizable=no")
}
function MOBILE_TC(){
	MOBILE_TCWindow = window.open("mobile_tc.html","MOBILE_TCWindow","toolbars=no,address=no,left=10,top=10,status=yes,width=320,height=300,scrollbars=yes,resizable=no")
}
function buytrack(){
	buytrackWindow = window.open("http://www.7digital.com/downloads/sod/default.asp?partner=0")
}
function openwindow(url,name,options) {
    newwindow = window.open(url,name,options)
}

function openSignupWindow(url) {
    signupExtraWindow = window.open(url,"signupExtraWindow","toolbars=no,address=no,left=10,top=10,status=yes,width=468,height=400,scrollbars=yes,resizable=no")
}

function signup(url) {
    signupwindow = window.open(url,"signup","toolbars=no,address=no,left=10,top=10,status=yes,width=468,height=400,scrollbars=yes,resizable=no")
}

function displayError(formNode, validators){
 var errorHTML = "";
 for(var i=0;i<validators.length;i++){
  errorHTML += "<li>" + validators[i].message + "</li>";
 }
 document.getElementById("errorDisplay").style.display = "block";
 document.getElementById("errorDisplay").innerHTML = "<ul>" + errorHTML + "</ul>";
}

function privacy(){
    privacyWin = window.open("privacy.php","privacyWin","toolbars=no,address=no,left=10,top=10,status=no,width=468,height=400,scrollbars=yes,resizable=no")
}

function terms(){
    termsWin = window.open("terms.php","termsWin","toolbars=no,address=no,left=10,top=10,status=no,width=468,height=400,scrollbars=yes,resizable=no")
}

function rules(){
    rulesWin = window.open("rules.php","rulesWin","toolbars=no,address=no,left=10,top=10,status=no,width=468,height=400,scrollbars=yes,resizable=no")
}

function highscores(){
    hsWin = window.open("leaderboard.php","leaderboard","toolbars=no,address=no,left=10,top=10,status=no,width=400,height=400,scrollbars=yes,resizable=no")
}

function getbrowserwidth() {
    	if (navigator.userAgent.indexOf("MSIE") > 0)	{
        		return(screen.width);
       	} else {
            	return(window.screen.width);
       	}	
}
        
function getbrowserheight() {
	if (navigator.userAgent.indexOf("MSIE") > 0) {
		return(screen.height);
    } else {
		return(window.screen.height);
	}
}
				
var popup = new Object()

function CenterPopup(URL, popname, width, height, scrollbars) {
									
		// get center of browser window
        var X = getbrowserwidth()/2;
        var Y = getbrowserheight()/2;
                    	
        popup = window.open(URL, popname, 
                    		'scrollbars=' + scrollbars + ',' +
                    		'width=' + width + ',' +
                    		'height=' + height + ',' +
                    		'top=' + ((Y - (height/2))) + ',' +
                    		'left=' + ((X - (width/2))) 
                    		);
                    	
        popup.focus();
}