//GLOBALS
d=document;
browser=navigator.userAgent;
isIE=0;
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? 1 : 0;


errorString="Possible Error :\n\n";
var errorDivs = new Array();

if(parent.frames.length >1){parent.location.href = self.document.location;}

function L2(lin,par,hrf){
par.onmouseover=function(){status=hrf;lin.style.color="#000";par.style.backgroundPosition="0 0px";if(par.style.cursor){par.style.cursor="pointer";}}
par.onmouseout=function(){lin.style.color="#fff";par.style.backgroundPosition="0 -27px";status="";return 1;if(par.style.cursor){par.style.cursor="default";}}
//par.onmousedown=function(){parent.location.href=hrf;}
}


function navMouseOvers(){
	LIST_COUNT=0;
	navLinks=document.getElementsByTagName("A");
	for (i=0;i<navLinks.length;i++) {
		navlink = navLinks[i];
		if(navlink.parentNode.className =="tab-on")
		{
			new L2(navlink,navlink.parentNode,navlink.getAttribute("href"));
		}
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function changeBack(obj){ 
  var id = obj.id+"";
  getQDiv="q"+(id.substr(2));
  getQDiv=d.getElementById(getQDiv);
  getQDiv.style.fontWeight="normal";
  getQDiv.style.color="#000099";
}

function mouseDownFormEles(){
 if(typeof d.f != 'undefined'){
	 dfeles = d.f.elements.length;
	 if(dfeles>1){
		for(i=0;i<dfeles-1;i++){
		if(d.f.elements[i].type=="select-one" || d.f.elements[i].type=="select-multiple"){
			if(typeof d.f.elements[i].onchange != "function"){
				d.f.elements[i].onchange=function(){changeBack(this);}
			}
			if(d.f.elements[i].selectedIndex>0){changeBack(d.f.elements[i]);}
		}
		if(d.f.elements[i].type=="text" || d.f.elements[i].type=="textarea"){
			d.f.elements[i].onkeypress=function(){changeBack(this);}
		}
		if(d.f.elements[i].type=="radio" && d.f.elements[i].name!="Cover" && d.f.elements[i].name!="Veterinary_Treatment_in_the_last_12_months" ){
			d.f.elements[i].onclick=function(){changeBack(this);}
			//if(d.f.elements[i].checked){e=d.f.elements[i].parentElement;changeBack(d.f.elements[i])}
		}
		if(d.f.elements[i].type=="checkbox"){
				d.f.elements[i].onclick=function(){
				if(this.checked){changeBack(this);}
			}
		}
		}
	 }
	}
}
function doLoad(){
//initImage()
navMouseOvers();

if(d.getElementById('a7')){d.getElementById('a7').innerText="Small Pet Cover";}
//onclick="MM_openBrWindow('http://www.healthy-pets.co.uk/site-map.htm','','status=yes,scrollbars=yes,resizable=yes,width=400,height=400');return false"
mouseDownFormEles();
}


