var $_GET=Array()
$chunks=window.location.href.split("/");
for($x=0; $x<$chunks.length; $x++){
	if($chunks[$x].search("_")){
		$parts=$chunks[$x].split("_");
		$_GET[$parts[0]]=$parts[1];
	}
}
function amILocal($needle){
	$haystack=window.location.href;
	if($haystack.search($needle)>=0){
		return true;
	} else {
		return false;
	}
}
if(amILocal(LOCAL_HOST)){
	ROOT="http://"+LOCAL_HOST+"/"+LOCAL_FOLDER+"/";
	AJAXURLstop=LOCAL_FOLDER;
} else if(LOCAL_HOST==BETA_HOST) {
    ROOT="http://"+BETA_URL+"/";
	AJAXURLstop=BETA_URL;
}else{
    ROOT="http://"+LIVE_URL+"/";
	AJAXURLstop=LIVE_URL;
}
function createCookie(name,value,days) {
	if(days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
URLparts=window.location.href.split("/");
addParts=true;
AJAXlink="";
for(i=URLparts.length-2; i>0; i--){
	if(URLparts[i]==AJAXURLstop){
		addParts=false;
	}
	if(addParts){
		AJAXlink+="../";
	}
}
AJAXlink+="ajax/";


window.addEvent("domready", function(){


	/*
	$$("ul.basket li").each(function(element){
		element.onmouseover=function(){
			this.setStyle("background-color", "#fcf7ee");
		}
		element.onmouseout=function(){
			this.setStyle("background-color", "");
		}
		element.onclick=function(){
			this.killer=new Fx.Styles(this, {duration:700, onComplete:function(){this.element.remove();}});
			this.killer.start({
				opacity:0
			});
		}
	});
	*/
});