
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
function showhidepets(){
	var disp = document.getElementById('pet').style.display;
	if(disp=="none"){
		document.getElementById('pet').style.display='block';
		return false;
	}

	if(disp=="block"){
		document.getElementById('pet').style.display='none';
		return false;
	}
}
function showhidetext(){
	var disp = document.getElementById('PetPolicy').style.display;
	if(disp=="none"){
		document.getElementById('PetPolicy').style.display='block';
		return false;
	}

	if(disp=="block"){
		document.getElementById('PetPolicy').style.display='none';
		return false;
	}
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

var showmenu=0,showmenu2=0,showmenu3=0,showmenu4=0,showmenu5=0,showmenu6=0,showmenu7=0,showmenu8=0
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function myTimeout()
{
	if(showmenu==0)
	{
		MM_showHideLayers('popuplayer_1','','hide');
	}
	else
	{
		MM_showHideLayers('popuplayer_1','','show');
	}
}
function myTimeout2()
{
	if(showmenu2==0)
	{
		MM_showHideLayers('popuplayer_2','','hide');
	}
	else
	{
		MM_showHideLayers('popuplayer_2','','show');
	}
}
function myTimeout3()
{
	if(showmenu3==0)
	{
		MM_showHideLayers('popuplayer_3','','hide');
	}
	else
	{
		MM_showHideLayers('popuplayer_3','','show');
	}
}
function myTimeout4()
{
	if(showmenu4==0)
	{
		MM_showHideLayers('popuplayer_4','','hide');
	}
	else
	{
		MM_showHideLayers('popuplayer_4','','show');
	}
}
function myTimeout5()
{
	if(showmenu5==0)
	{
		MM_showHideLayers('popuplayer_5','','hide');
	}
	else
	{
		MM_showHideLayers('popuplayer_5','','show');
	}
}

function myTimeout6()
{
	if(showmenu6==0)
	{
		MM_showHideLayers('popuplayer_6','','hide');
	}
	else
	{
		MM_showHideLayers('popuplayer_6','','show');
	}
}
/*function Redius_search(){

	var i = 0;
	var temp = true;
	//var label = document.getElementById('zip_city');
		//alert(document.searchResults.search.length);



	//alert(document.searchResults.search_detail.value);
	if(trim(document.searchResults.search_detail.value) == "" && trim(document.searchResults.address.value) == "" )
	{
		alert("Please Specify Value For Search");
		document.searchResults.search_detail.focus();
		document.searchResults.search_detail.value = "";
		temp = false;
		return temp;
	}
	if(trim(document.searchResults.address.value) == ""){
	if(isInteger(document.searchResults.search_detail.value) == false || document.searchResults.search_detail.value.length >5 || document.searchResults.search_detail.value.length < 5){
		alert("Please Enter Valid Numeric value As Zipcode");
		document.searchResults.search_detail.focus();
		document.searchResults.search_detail.value = "";
		temp = false;
		return temp;
		}
	}
	//alert(document.searchResults.search_detail.value.length);



	if(temp == true){
		//alert("inside process");
		//var divid = document.getElementById('admin/process.php');
		openprocess('proc_contents');
	//emailwindow=dhtmlmodal.open('myprocessbox','div',mypagename,"Pelase Wait..........",'width=300px,height=200px,left=190,center=1,resize=0,scrolling=0');
	}
	//alert("test");
	return temp;
}*/
function Redius_search(){
	//alert("inside function");
	var i = 0;
	var temp = true;
	if(document.getElementById('zip_city').style.display == 'block'){
		if(trim(document.searchResults.address.value) == ""){

			document.searchResults.address.focus();
		document.searchResults.address.value = "";
		document.getElementById('adderror').style.display = 'inline';
		temp = false;
		return temp;
		}
	}
	if(trim(document.searchResults.search_detail.value) == "" )
	{
		//alert("Please Enter Zipcode");
		document.searchResults.search_detail.focus();
		document.searchResults.search_detail.value = "";
		document.getElementById('adderror').style.display = 'none';
		document.getElementById('ziperror').style.display = 'inline';
		temp = false;
		return temp;
	}
	if(isInteger(document.searchResults.search_detail.value) == false || document.searchResults.search_detail.value.length !=5){
		//alert("Please Enter Valid Zipcode");
		document.searchResults.search_detail.focus();
		document.searchResults.search_detail.value = "";
		document.getElementById('adderror').style.display = 'none';
		document.getElementById('ziperror').style.display = 'inline';
		temp = false;
		return temp;
	}




	if(temp == true){
		//alert("inside process");
		//var divid = document.getElementById('admin/process.php');
		openprocess('proc_contents');
	//emailwindow=dhtmlmodal.open('myprocessbox','div',mypagename,"Pelase Wait..........",'width=300px,height=200px,left=190,center=1,resize=0,scrolling=0');
	}
	//alert("test");
	return temp;
}

function dispmsg1()
{
	//alert("bhumika");
	var label = document.getElementById('zip_city');
	document.getElementById('zip_city').style.display='block';
	//document.searchResults.radius.disabled;
	//label.innerHTML = "city :";
	return false;
}
function dispmsg()
{
	//alert("bhumika");
	var label = document.getElementById('zip_city');
	document.getElementById('zip_city').style.display='none';
	//document.searchResults.radius.disabled;
	//label.innerHTML = "city :";
	return false;
}
function trim(Value)
{

	return Value.replace(/^\s+|\s+$/g, "");
}
function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}
function chk(petcount){
	var i=0;
	var t = "";
	//alert(petcount);
	// alert(document.getElementById('chkall').checked);
	 //alert(document.additionaldatfrm.chkall.value);
	//document.getelementBy
	if(document.getElementById('chkall').checked == true){
	for(i=0;i<petcount;i++){
		if(document.getElementById("chk"+i))
		document.getElementById("chk"+i).checked = true;

		}
	}
	if(document.getElementById('chkall').checked == false){
	for(i=0;i<petcount;i++){
		if(document.getElementById("chk"+i))
		document.getElementById("chk"+i).checked = false;

		}
	}
	//alert(count);
}
function openprocess(mypagename){
	//alert("hi");
	emailwindow=dhtmlmodal.open('myprocessbox','div',mypagename,"Pelase Wait..........",'width=300px,height=200px,left=190,center=1,resize=0,scrolling=0');
	return true;
	//alert(emailwindow);
	//window.open('process.html');
	//alert("bhumika");
//	emailwindow=dhtmlmodal.open('EmailBox', 'iframe', 'process.php', 'Processing....','width=600px,height=800px,left=190,center=1,center=yes,resize=0,scrolling=0');
}
function myTimeout7()
{
	if(showmenu7==0)
	{
		MM_showHideLayers('popuplayer_7','','hide');
	}
	else
	{
		MM_showHideLayers('popuplayer_7','','show');
	}
}
function myTimeout8()
{
	if(showmenu8==0)
	{
		MM_showHideLayers('popuplayer_8','','hide');
	}
	else
	{
		MM_showHideLayers('popuplayer_8','','show');
	}
}
function chkall(count){
	alert(count);
}
setTimeout("myTimeout();", 100);
setTimeout("myTimeout2();", 100);
setTimeout("myTimeout3();", 100);
setTimeout("myTimeout4();", 100);
setTimeout("myTimeout5();", 100);
setTimeout("myTimeout6();", 100);
setTimeout("myTimeout7();", 100);
setTimeout("myTimeout8();", 100);
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

