/////////////////////////////////////////////////////////////////
// function to do rollovers on navigation bar images	
// 1 parameter
// num: allows us to know which image swap needs to be carried out
/////////////////////////////////////////////////////////////////
function swapImage(num){
	if (num=="1") document.images ['home'].src = homeon.src;
	else if (num=="2") document.images ['home'].src = homeoff.src;				
	else if (num=="3") document.images ['aboutus'].src = aboutuson.src;	
	else if (num=="4") document.images ['aboutus'].src = aboutusoff.src;	
	else if (num=="5") document.images ['products'].src = productson.src;
	else if (num=="6") document.images ['products'].src = productsoff.src;
	else if (num=="7") document.images ['news'].src = newson.src;				
	else if (num=="8") document.images ['news'].src = newsoff.src;	
	else if (num=="9") document.images ['order'].src = orderon.src;	
	else if (num=="10") document.images ['order'].src = orderoff.src;		
	else if (num=="11") document.images ['contactus'].src = contactuson.src;	
	else if (num=="12") document.images ['contactus'].src = contactusoff.src;		
	else if (num=="13") document.images ['basket'].src = basketon.src;	
	else if (num=="14") document.images ['basket'].src = basketoff.src;			
	else if (num=="15") document.images ['links'].src = linkson.src;	
	else if (num=="16") document.images ['links'].src = linksoff.src;			

}
	
		
/////////////////////////////////////////////////////////////////		
// function to check email address is entered on contact form
// 1 parameter
// form: form that iot is called from is passed to the function to allow evaluation	
/////////////////////////////////////////////////////////////////
function isReady(form){
if (form.email.value!="")return true;
else {
	alert("We need to know your email address in order to get back to you. Thanks.");
	form.email.focus();
	return false;
	}
}

/////////////////////////////////////////////////////////////////
// generic function to open a pop up window
// 6 parameters
// url: the page to be opened
// winname: name of the window to be opened(used to enable live interaction with pop up window)
// winheight: height of the window
// winwidth: width of the window
// menubar: 1=menubar;0=no menubar
// scrollbars: 1=scrollbars;0=no scrollbars 
/////////////////////////////////////////////////////////////////

function openwin(url,winname,winheight,winwidth,menubar,scrollbars){
	if (winheight==null) winheight='600';
	if (winwidth==null) winwidth='800';
	window.open(url, winname,'toolbar=0,location=0,directories=0,status=0,menubar='+menubar+',scrollbars='+scrollbars+', marginheight=0, marginleft=0, marginright=0, resizable=1,width='+winwidth+',height='+winheight);
	}	