var newWin = null;function launchNewWin(URL, windowName, windowWidth, windowHeight, scrollbars){	var xposition = 400; 	var yposition = 300;	    if ((parseInt(navigator.appVersion) >= 4 )) {        xposition = (screen.width - windowWidth) / 2;        yposition = (screen.height - windowHeight) / 2;    }		if (!scrollbars) var scrollbars = 0;	    var args = "width=" + windowWidth + ","	    	+ "height=" + windowHeight + ","	    	+ "location=0,"		    + "menubar=0,"		    + "scrollbars=" + scrollbars + ","		    + "status=0,"		    + "titlebar=0,"		    + "hotkeys=0,"		    + "screenx=" + xposition + ","  // NN Only		    + "screeny=" + yposition + ","  // NN Only		    + "left=" + xposition + ","     // IE Only		    + "top=" + yposition;           // IE Only			if (newWin != null && !newWin.closed) {		newWin.close();	}	newWin = window.open(URL, windowName, args);		newWin.focus();}function setCookie(name, value, expiration, path, domain, secure){	if (name != "" && value != "")	{		var thisCookie = name + "=" + escape(value);		if (expiration) thisCookie += '; expires=' + new Date((new Date()).getTime() + expiration * 3600000).toGMTString();		if (path) thisCookie += '; path=' + path;		if (domain) thisCookie += '; domain=' + domain;		if (secure) thisCookie += '; secure';		    	document.cookie = thisCookie;	}}function getCookie(name){	var cookies = document.cookie;    var value = "";    var start = cookies.indexOf(name + '=');    var end = 0;	if (start == -1) value = null;    else {		start += name.length + 1;    	end = cookies.indexOf(';', start);        if (end == -1) end = cookies.length;    	value = unescape(cookies.substring(start, end));	}    return value;}function submitEmailForm(email){	var formObj = document.forms['emailForm'];		formObj.email.value = email;		var URL = "../php/popup.php?category=email_form";		launchNewWin(URL, 'newWin', 380, 300);		formObj.target = 'newWin';		formObj.submit();}function launchVideoGalleryWin(videoID){	var URL = '../php/popup.php?category=video_gallery&videoID=' + videoID;		launchNewWin(URL, 'newWin', 380, 300);}function validateVoter(pollID){	var registeredPollID = getCookie("Madonna_Polls");	if (registeredPollID == pollID)	{		return false;	}	else return true;}function registerVoter(pollID){	setCookie("Madonna_Polls", pollID, 10000, "/");}function vote(pollID){	if (validateVoter(pollID))	{		registerVoter(pollID);				formObj.submit();	}	else {		alert("You may only vote once per poll.\nThanks for your vote.");	}}