// JavaScript Document


function popup(url,winname,w,h,feat)
{
	if (!(isNaN(w) || isNaN(h)))
	{
		var x=parseInt((screen.width-w)/2);
		var y=parseInt((screen.height-h)/2);
		if (x<0)	x=0;
		if (y<0)	y=0;
		
		if (feat!=null && feat!="")
		{
			feat=","+feat;
		}
		else
		{
			feat="";
		}
		feat="left="+x+",top="+y+",width="+w+",height="+h+feat;
	}
	window.open(url,winname,feat);
}


function helpMe() {
	popup(dotdotpath+"help","",900,700,"");
}

function changelang()
{
	document.language.submit();	
}

function changetheme(colour)
{
	$.post(dotdotpath + "settheme.cfm", {colour: colour}, function(data){
		document.getElementById("theme_bodytile").className="bodytile_"+colour;	
		document.getElementById("theme_outline").className="outline_"+colour;	
		document.getElementById("theme_header").className="row header_"+colour;	
	});
}

function changepet(petnumber)
{
	$.post(dotdotpath + "setpet.cfm", {petnumber: petnumber}, function(data){
	});
}


function friend(page)
{
	popup(dotdotpath+"_include/ssi/sendtoafriend.cfm?page="+page,"",300,500,"");
}

function newsletter()
{
	popup(dotdotpath+"_include/ssi/newsletter.cfm","",300,500,"");
}

function trackclick(reference)
{
	WT.mc_id=EMAIL-TXT-reference-Language-webTrendsCode
}