<!--
var clickEmail=0;
var isCleared=0;
var displayPopup=true; //Display popup on all pages. Set to false to deactivate popup

function PreviewImage(location) {//remove out of code. Convert to PreviewImageSize
	var w = 440;
	var h = 340;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,location=no,scrollbars=yes';
	window.open(location,'',winprops);
}
function PreviewImageSize(location,w,h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,location=no,scrollbars=yes';
	window.open(location,'',winprops);
}
function loadImage(location) {
	window.open(location,'','toolbar=no,menubar=no,location=no,scrollbars=yes,width=610,height=450');
}
function openWin(location) {
	var w = 350;
	var h = 400;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,location=no,scrollbars=yes';
	window.open(location,'',winprops);	
}
function noPopUp() {isCleared = 1;}
function popUp() {
	if (isCleared == 0) {	
		var w = 800;
		var h = 500;
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;			
		var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,location=no,scrollbars=yes';
		window.open('http://','Win',winprops);		
	}
}
function tellfriend(loc,w,h) {	
	var nw;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,location=no,scrollbars=yes';
	nw = window.open(loc,'tell',winprops);	
}
function popUnder(loc,w,h) {
	var win2;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;	
	var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,resizable=no,location=no,scrollbars=no';
	win2=window.open(loc,'',winprops);
	win2.blur()
	window.focus()	
}
function popUnderScroll(loc,w,h) {
	var win2;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;	
	var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,resizable=no,location=no,scrollbars=yes';
	win2=window.open(loc,'',winprops);
	win2.blur()
	window.focus()	
}
function popUpScroll(loc,w,h) {	
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;	
	var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,resizable=no,location=no,scrollbars=yes';
	window.open(loc,'',winprops);
}
function subscribe(form){
	var w = 650;
	var h = 550;
	var sub;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops ='height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,location=no,scrollbars=yes';
	
	isCleared = 1;
	var sEmail = form.email.value;
	if (sEmail == "") {
		alert("You forgot the email address. Please enter a valid email address to continue. Thanks");
		return false;
	} else if (sEmail.indexOf("@") < 0) {
		alert("You are missing '@' in your email address. Please enter a valid email address to continue. Thanks");
		return false;
	} else if (sEmail.indexOf(".") < 0) {
		alert("You are missing '.' in your email address. Please enter a valid email address to continue. Thanks");
		return false;
	} else {
		sub = window.open('newsletter.php','email',winprops);
		sub.focus();
		return true;
	}
}
function setCookie(NameOfCookie, value, expirehours) {
	var ExpireDate = new Date ();
	ExpireDate.setTime(ExpireDate.getTime() + (expirehours * 3600 * 1000));
	document.cookie = NameOfCookie + "=" + escape(value) +
	((expirehours == null) ? "" : "; expires=" + ExpireDate.toGMTString()) +
	"; path=/;" ;
}

function screen_saver_link(url) {
	document.location.href = "http://www.grabfreewallpaper.com/" + url;
}


//-->