// JavaScript Document

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function clearfield(){
if (document.searchform.search.value == "Search words")
	document.searchform.search.value = "";
}
function checksearch(f){
var searchoption;
if (searchoption = document.searchform.searchtype.value == "advanced") return true;
if (document.searchform.search.value == "Search words" || document.searchform.search.value == "")
	{
	alert("You must enter a search word or phrase");
	return false;
	}
if (document.searchform.search.value.length < 3)
	{
	alert("Your search word must be 3 or more characters");
	return false;
	}

return true;
}

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);

function initPopupBox(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.PopupBoxDiv.style');
	else if(ns)	adDiv=eval('document.layers["PopupBoxDiv"]');
	else if(w3)	adDiv=eval('document.getElementById("PopupBoxDiv").style');
	showPopupBox();
}
function initPopupBasket(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.popupbasket.style');
	else if(ns)	adDiv=eval('document.layers["popupbasket"]');
	else if(w3)	adDiv=eval('document.getElementById("popupbasket").style');
    if (ie||w3)
        adDiv.visibility="visible";
    else
        adDiv.visibility ="show";
}
function closePopupBasket(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.popupbasket.style');
	else if(ns)	adDiv=eval('document.layers["popupbasket"]');
	else if(w3)	adDiv=eval('document.getElementById("popupbasket").style');
	closePopupBox();
}
function showPopupBox(){
	var calunit=ns? "" : "px"
	if (ie){documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-20;
		documentHeight =truebody().offsetHeight/2+truebody().scrollTop-20;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
		documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
		documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
		
	adDiv.left=documentWidth-50+calunit;adDiv.top =documentHeight+calunit;

    if (ie||w3)
        adDiv.visibility="visible";
    else
        adDiv.visibility ="show";
		
	setTimeout("closePopupBox()",9000);
}
function closePopupBox(){
if (ie||w3)
	adDiv.visibility="hidden";
else
	adDiv.visibility ="hide";
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 
