// JavaScript Document

cartNum1="75201762";
ct1="http://ww5.aitsafe.com/cf/review.cfm?userid=75201762&return=http://www.egyptianmagic.com/store.htm";
ct2="http://ww12.aitsafe.com/cf/review.cfm?userid=E686992&return=http://www.egyptianmagic.com/store.htm";
ctInt="http://ww12.aitsafe.com/cf/review.cfm?userid=E0189060&return=http://www.egyptianmagic.com/store.htm";
st1="http://ww5.aitsafe.com/cf/add.cfm?userid=75201762&product=Egyptian+Magic+4oz+Jar&price=36.00&return=http://www.egyptianmagic.com/store.htm";
st2="http://ww12.aitsafe.com/cf/add.cfm?userid=E686992&product=Egyptian+Magic+4oz+Jar&price=36.00&return=http://www.egyptianmagic.com/store.htm";
stInt="http://ww12.aitsafe.com/cf/add.cfm?userid=E0189060&product=Egyptian+Magic+4oz+(120ml)+Jar&price=36.00&return=http://www.egyptianmagic.com/store.htm";
cgw="store-cgw.htm";
em="store.htm"

mals=new Array();
mals[0] = "http://ww";
mals[1] = "aitsafe.com/cf/";
mals[2] = "&return=http://www.egyptianmagic.com/store.htm";

ct=ct1;
st=st1;
flag=true;
var e = new Array("BE","DE","IE","UK","GB","NL","MC","NO","SE","DK","FI");
//var e = new Array("BE","IE","IT","FR","UK","GB","DE","NL","MC","NO","SE","DK","FI");
var a = new Array("HK","TW","CN","SG","MY","KR","AU","NZ","JP","ID","IN","PH","TH");
var n = new Array("US","CA");

function locator(){
	var c = "US";
	if(window.geoip_country_code){c = geoip_country_code();}
	for (i in e){if(c==e[i]){return "int";}}
	for (i in a){if(c==a[i]){return "int";}}
	if((c=="US") && flag){return "2";}
	return false;
}

function CGWTest(){
	var c = "US";
	if(window.geoip_country_code){c = geoip_country_code();}
    if(c!="US" && c!="BR" && c!="CA") {return "cgw";}
	return false;
}

function get_cart(){
	ct=ct1;
	if(locator()=="int"){ct=ctInt;}
	if(locator()=="2"){ct=ct2;}
	window.location=ct;
}

function get_store(){
	st=st1;
    if(locator()=="int"){st=stInt;}
	if(locator()=="2"){st=st2;}
	window.location=st;
}

function get_store_page(){
	storePage=em;
    if(CGWTest()=="cgw"){storePage=cgw;}
	window.location=storePage;
}