var lang ="en-gb";
var lang1 ="shop";
var primCurr="GBP";
var SecondCurr="USD";
var set_currency="";
var prices="";
var symbol="";
var decimals="";
var version=0;
var fname ="enter";
var currentLocation;
var loaded = false;
var targeted=false;
var currentContent="front.html"; //front.html";
var cdataLoaded=false;
var frontLoaded=false;
var buttonLoaded=false;
var tocLoaded=false;
var goodBrowser=false;
var coreCalled=false;
var deptCalled=false;
var deptLoaded=false;
var cLoadLoaded=false;
var xLoaded=false;
var globeMerchantid="";
var globe_resellerid="";
var globe_password="";
var globe_count=0;
var globe_message1="";
var globe_error1="";
var globe_error2="";
var passwordLoaded=false;
var frontIn="";
var appName=navigator.appName;
var appVersion=parseInt(navigator.appVersion);
if(appName=="Netscape") if(appVersion>=3) goodBrowser=true;
if(appName=="Microsoft Internet Explorer")
	if(appVersion<=2)
		appVersion=3;
	else
		goodBrowser=true;
if(appVersion<3){
	alert("This shopping cart utilises frames and advanced JavaScript, and as such requires a version 3 browser.");
	history.go(-1);
}
//function to check that before loading core nothing else has loaded core.
function coreLoad() {
	if(!coreCalled && xLoaded) {
		extra.core.location="core.html";
		coreCalled=true;
	}
}
function load() {
	if(true&&true) {
		if(buttonLoaded && tocLoaded && frontLoaded) {
			coreLoad();
		}
	}
	else if(true) {
		if(buttonLoaded && frontLoaded) {
			coreLoad();
		}
	}
	else if(true) {
		if(tocLoaded && frontLoaded) {
			coreLoad();
		}
	}
}
function splitStr(str,del) {
	if(goodBrowser) return(str.split(del));
	else {
		var a=new Array();
		var i=0; var j=0; k=0;
		while(i!=-1) {
			j=str.indexOf(del,i);
			if(j!=-1) {
				a[k]=str.substring(i,j);
				k++;
				i=j+del.length;
				if(i==str.length) i=-1;
			} else {
				a[k]=str.substring(i,str.length);
				i=-1;
			}
		}
		return(a);
	}
}
var mainLoaded=false;
var coreLoaded=false;
var totalLoaded=false;
var resell="";
var cookiePath="";
if(cookiePath=="" && location.pathname!="" && location.protocol.toLowerCase().substring(0,4)!="file") cookiePath=location.pathname;
if(cookiePath!="") cookiePath=cookiePath.substring(0,cookiePath.lastIndexOf("/")+1);
var cookieDomain="";
if(cookieDomain=="" && location.hostname!="" && location.protocol.toLowerCase().substring(0,4)!="file") cookieDomain=location.hostname;
var serverProtocol="";
if(serverProtocol=="" && cookieDomain!="") serverProtocol="http://";
function mArr(n) {
	this.count=n;
	return(this);
}
function parameter(name, value) {
	this.name=name;
	this.value=value;
	return(this);
}
var queryString=location.search;
var parameters=new mArr(0);
var clickThrough="";
var aid="";
var rid="";
var ofs="";
var curr="";
if(queryString!="") {
	queryString=queryString.substring(1,queryString.length);
	var pairs=splitStr(queryString,"&");
	for(var i=0; i<pairs.length; i++) {
		temp=splitStr(pairs[i],"=");
		parameters.count++;
		parameters[i+1]=new parameter(unescape(temp[0]),unescape(temp[1]));
		if(parameters[i+1].name.toLowerCase()=="mid") {
			if(parameters[i+1].value!="") {
				clickThrough=parameters[i+1].value;
			}
		}
		if(parameters[i+1].name.toLowerCase()=="rid") {
			if(parameters[i+1].value!="") {
				rid=parameters[i+1].value;
			}
		}
		if(parameters[i+1].name.toLowerCase()=="aid") {
			if(parameters[i+1].value!="") {
				aid=parameters[i+1].value;
			}
		}
		if(parameters[i+1].name.toLowerCase()=="target") {
			if(parameters[i+1].value!="") {
				targeted=true;
				var query1=document.URL;
				quest = query1.indexOf('#');
				queryString="";
				if (quest>0) queryString=query1.substr(quest);
				currentContent=parameters[i+1].value + queryString;
			}
		}
		if(parameters[i+1].name.toLowerCase()=="ofs") {
			if(parameters[i+1].value!="") {
				ofs=parameters[i+1].value;
			}
		}
		if(parameters[i+1].name.toLowerCase()=="curr") {
			if(parameters[i+1].value!="") {
				curr=parameters[i+1].value;
			}
		}
		if(parameters[i+1].name.toLowerCase()=="lang") {
			if(parameters[i+1].value!="") {
				lang=parameters[i+1].value;
			}
		}
	}
}
if(clickThrough=="") {
	clickThrough=getCookStr("CLICK_THROUGH");
} else {
	savCookStr("CLICK_THROUGH",clickThrough,90);
}
if(rid=="") {
	rid=getCookStr("RID");
} else {
	savCookStr("RID",rid,90);
}
if(aid=="") {
	aid=getCookStr("AID");
} else {
	savCookStr("AID",aid,90);
}
function savCookStr(name,str,exp) {
	var strPath=cookiePath;
	var strDomain=cookieDomain;
	if(location.protocol.toLowerCase().substring(0,4)=="file") {
		strPath="";
		strDomain="";
	}
	var cookieStr="0400"+str;	// set version number
	var cookie=name+"="+escape(cookieStr);
	var expiration=new Date();
	if (exp==-1) {
		expiration.setYear(2010);
		expiration.setMonth(01);
		expiration.setDate(01);
	} else {
		var t=expiration.getTime();
		var msPerDay=24*60*60*1000;
		t+=(msPerDay*exp);
		expiration.setTime(t);
	}
	if(exp!=0) {
		cookie+="; expires="+expiration.toGMTString();
	} else {	// zero duration...  explicitly clear cookie
		cookie=name+"=";
	}
	if(strPath!="") {
		cookie+="; path="+strPath;
	}
	if(strDomain!="") {
		cookie+="; domain="+strDomain;
	}
	document.cookie=cookie;
}
function getCookStr(name) {
	var allCookies=document.cookie;
	var start=allCookies.indexOf(name+"=");
	if(start==-1)
		return("");
	start+=name.length+1;
	var end=allCookies.indexOf(';',start);
	if(end==-1) end=allCookies.length;
	var cookieStr=unescape(allCookies.substring(start,end));
	if(cookieStr.length<4) return("");
	if(cookieStr.substring(0,4)!="0400") return("");	// check version number
	cookieStr=cookieStr.substring(4,cookieStr.length);
	return(cookieStr);
}
var dv=false;
function demo_alert() {
	dv=true;
	if(location.protocol.toLowerCase().substring(0,4)!="file") {
		alert("http://www.bdsm-lingerie.com");
	}
}
function currency(currency_name, iso, currencyAbbrev, currency_multiplier, decimal_places) {
	this.index = 0;
	this.name = currency_name;
	this.iso = iso;
	this.abbrev = currencyAbbrev;
	this.multiplier = currency_multiplier;
	this.decimal_places = decimal_places;
}
var baseCurrency = new currency("", "", "", 1.0, 2);
var currentCurrency = new currency("", "", "", 1.0, 2);
var shopCurrency = new currency("", "", "&pound;", 1.0, 2);
var euroCurrencies=new mArr(13);
euroCurrencies[1]=new currency("European Euro", "EUR", "Euro",1.0,2);
euroCurrencies[2]=new currency("Austrian Schillings", "ATS", "öS",13.7603,2);
euroCurrencies[3]=new currency("Belgian Francs", "BEF", "BF",40.3399,2);
euroCurrencies[4]=new currency("Dutch Guilders", "NLG", "fl.",2.20371,2);
euroCurrencies[5]=new currency("Finnish Markka", "FIM", "Fmk",5.94573,2);
euroCurrencies[6]=new currency("French Francs", "FRF", "F",6.55957,2);
euroCurrencies[7]=new currency("German Marks", "DEM", "DM",1.95583,2);
euroCurrencies[8]=new currency("Irish Punt", "IEP", "IEP",0.787564,2);
euroCurrencies[9]=new currency("Italian Lira", "ITL", "Lit",1936.27,0);
euroCurrencies[10]=new currency("Luxembourg Francs", "LUF", "LuxF",40.3399,2);
euroCurrencies[11]=new currency("Portugese Escudo", "PTE", "Esc",200.482,2);
euroCurrencies[12]=new currency("Spanish Pesetas", "ESP", "Ptas",166.386,2);
euroCurrencies[13]=new currency("Greek Drachma", "GRD", "Dr",340.750,2);
var shopUrl	= serverProtocol + cookieDomain + cookiePath;
if(shopUrl != "") {
	shopUrl += "bdsm-lingerie-shop.html";
}
document.writeln("<frameset rows=\"32,*,22\"  framespacing=0 border=0>"); document.writeln("<frame src=\""+lang1+"/button1.html\" name=\"buttons\" noresize scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\">"); document.writeln("<frame src=\""+lang1+"/fs_menu.html\" name=\"main\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\">"); document.writeln("<frame src=\""+lang1+"/extra.html\" name=\"extra\" noresize scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\">"); document.writeln("</frameset>");
