// JavaScript Documentvar domain_name="http://www.gurome.com/info/";var catalog_loc=domain_name+"CatalogItem/";function set_cookie(){    //var city_id=getQueryVariable('cityid');    var curr_url=document.location.href;    var arr=curr_url.split("/");    	var new_page='index.html';    //var new_page=arr[arr.length-1];    	//var country_id='CA';	var country_id=document.getElementById('locationSelectBox').value;    var exdate=new Date();    exdate.setDate(exdate.getDate()+365);    //exdate1.setDate(exdate1.getDate()+1);    if(country_id.toLowerCase()=='ca' || country_id.toLowerCase()=='india')    {        //document.cookie="curr_country =;expires=Thu, 01-Jan-1970 00:00:01 GMT";        //setCookie(name, '', -30, path, domain);        var mydate = new Date();        document.cookie = 'curr_country='+escape(country_id)+';expires='+exdate.toGMTString()+'; path=/';        //document.cookie="curr_country =" +escape(country_id)+";expires="+exdate.toGMTString();        //document.cookie="curr_country =" +escape(country_id)+";expires="+exdate.toGMTString()+"; path="+domain_name;        if(country_id.toLowerCase()=='ca')        {            country_id="us";        }	        if(country_id.toLowerCase()=='india')        {            country_id="india";        }        new_page=domain_name+""+country_id+"/"+new_page;        document.location.href=new_page;    //history.go(0);    }}function set_cookie_locations(obj){    //var city_id=getQueryVariable('cityid');    var country_id=obj.value;    //alert(obj.value);    var exdate=new Date();    exdate.setDate(exdate.getDate()+365);    //exdate1.setDate(exdate1.getDate()+1);	    if(country_id.toLowerCase()=='ca')    {        country_id="us";    }	    if(country_id.toLowerCase()=='india')    {        country_id="india";    }	    if(country_id.toLowerCase()=='us' || country_id.toLowerCase()=='india')    {        //document.cookie="curr_country =" +escape(country_id)+";expires="+exdate.toGMTString();        if(country_id.toLowerCase()=="us")        {            var ck="CA";        }        else        {            var ck="india";        }        document.cookie =        'curr_country='+escape(ck)+';expires='+exdate.toGMTString()+'; path=/';        new_page=domain_name+""+country_id+"/index.html";        document.location.href=new_page;    //history.go(0);    }    try    {        var qString = document.URL.split("?");        var qStringParam = qString[1].split("=");        var new_url=domain_name+""+country_id+"/"+qStringParam[1]+".html";        //alert(new_url);        //document.location.href=qStringParam[1]+"_"+obj.value+".html";        document.location.href=new_url;    }    catch(e)    {    }}function Navigate_page(name,page) {    var location = document.cookie.split(name+'=')[1];    location = location ? location.split(';')[0].toLowerCase() : null;    if (location == 'ca')        location = 'us';    if (location) {        var url=domain_name+location+"/"+page+".html";        if(document.location.href!=url)            document.location=url;    } else {        if (page != "index")            document.location.href=domain_name+'locations.html?page='+page;    }}function check_cookie(name) {    var dc = document.cookie;    var prefix = name + "=";    var begin = dc.indexOf("; " + prefix);    if (begin == -1) {        begin = dc.indexOf(prefix);        try        {            if (begin != 0 && document.location.indexOf('locations.html')<0)            {                //	alert('Please Select Your Location');                var index_url=domain_name+"index.html";                document.location.href=domain_name+'locations.html';			                return false;            }        }        catch(e)        {        }    } else {        begin += 2;    }    var end = document.cookie.indexOf(";", begin);    if (end == -1) {        end = dc.length;    }    var cookie_val=unescape(dc.substring(begin + prefix.length, end));    if(cookie_val.toLowerCase()=='india')    {        cookie_val='India';    }    document.getElementById('locationSelectBox').value=cookie_val;    try    {        document.getElementById('locationSelectBox1').value=cookie_val;    }    catch(e)    {    }//    return unescape(dc.substring(begin + prefix.length, end));}function check_page(cookie_name,page,current_page) {    var dc = document.cookie;    var prefix = cookie_name + "=";    var begin = dc.indexOf("; " + prefix);    if (begin == -1) {        begin = dc.indexOf(prefix);        if (begin != 0)        {            //		alert('Please Select Your Location');            document.location.href=domain_name+"locations.html?page="+page;            return false;        }    } else {        begin += 2;    }    var end = document.cookie.indexOf(";", begin);    if (end == -1) {        end = dc.length;    }    var lang=unescape(dc.substring(begin + prefix.length, end));    //url=page+"_"+lang+".html";    url=domain_name+lang+"/"+page+".html";    if(lang=="")    {        //		alert('Please Select Your Country');        document.location.href=domain_name+"locations.html?page="+page;    //document.location.href="locations.html";    //return false;    }    if(current_page.toLowerCase()!=url.toLowerCase())    {    //document.location=url;    }    try    {        document.getElementById('locationSelectBox').value=lang;    }    catch(e)    {    }//return unescape(dc.substring(begin + prefix.length, end));}function get_cookie(name) {    var dc = document.cookie;    var prefix = name + "=";    var begin = dc.indexOf("; " + prefix);    if (begin == -1) {        begin = dc.indexOf(prefix);        //alert(document.location.href);        try        {            if (begin != 0 && document.location.indexOf('locations.html')<0)            {                //			alert('Please Select Your Location');                //document.location.href="locations.html?page="+page;                document.location.href=domain_name+'locations.html';                return false;            }        }        catch(e)        {        }    } else {        begin += 2;    }    var end = document.cookie.indexOf(";", begin);    if (end == -1) {        end = dc.length;    }    var cookie_val=unescape(dc.substring(begin + prefix.length, end));    document.getElementById('locationSelectBox').value=cookie_val;//    return unescape(dc.substring(begin + prefix.length, end));}function move_direct(page_name){    document.location.href=domain_name+""+page_name;}function add_product(catalogItemNum){    document.location.href=catalog_loc+catalogItemNum+"/addToShoppingCart";}