﻿function goPage(strPageName)
{
	window.location.href = strPageName;
}
function NavBackOn(objLi)
{
	if (objLi.className.length > 0)
		objLi.className += " hover";
	else
		objLi.className = "hover";
}
function NavBackOff(objLi)
{
	objLi.className = objLi.className.replace(/hover/, "");
}
function closeTaf()
{
	document.getElementById("tellafriend").style.display = 'none';
	
	var objReg = document.getElementById("regform");
	if (objReg != null)
	{
		objReg.style.visibility = "visible";
		document.getElementById("frmRegSubmit").value = "true";
	}
}
function openTAF()
{
	document.getElementById("tellafriend").style.display = 'block';	
	
	var objReg = document.getElementById("regform");
	if (objReg != null)
	{
		objReg.style.visibility = "hidden";
		document.getElementById("frmRegSubmit").value = "false";
	}
}
function openTAFThankYou()
{
	
	document.getElementById("tellafriend").style.display = 'none';
	document.getElementById("tellafriendthankyou").style.display = 'block';
	
}

function closeTafThankYou()
{
	document.getElementById("tellafriendthankyou").style.display = 'none';
}

function AddBookmark()
{
	if (window.sidebar) 
	{ 
		window.sidebar.addPanel('Quest Diagnostics India',window.location.href, "");
	} 
	else if (window.external) 
	{ 
		window.external.AddFavorite(window.location.href, 'Quest Diagnostics India'); 
	}
	else if (window.opera && window.print) 
	{
		return true; 
	}	
}
function doClick_local(buttonName,e)
{
     
    //the purpose of this function is to allow the enter key to 
    //point to the correct button to click.
   var key;
   if(window.event)
        key = window.event.keyCode;     //IE
    else
        key = e.which;     //firefox
       
 if (key == 13)
 {      
     //Get the button the user wants to have clicked
      var btn = document.getElementById(buttonName);
      if (btn != null)
      { //If we find the button, click it
     
          btn.click();
          event.keyCode = 0
      }
   }
}    

// JavaScript Document

/*Function popUp*/
function MM_openBrwindow(theurl, winName, features) { //v2.0
			window.open(theurl, winName, features);
				}


/* newly added on 10th nov*/
function open_usrReq()
{   
    document.getElementById("divMsgBlockNone").style.display= "none";
    document.getElementById("userrequest").style.display= "block";
}
function close_usrReq()
{
   
    document.getElementById("userrequest").style.display="none";
    //document.getElementById("ctl00_incUserRequest_lblmsg").text="";
  
}
function valid_usrReq()
{
    
}
 function openFlash()
{
    
    
   var strUrl=window.location.href;
   var str="default.aspx";
   
   if(globvar)
   {
               //for questdiagnostics.in and development system and web shared path.
               if((strUrl=="http://questdiagnostics.in")||(str==strUrl.match("default.aspx"))||(strUrl=="http://10.97.40.68/QuestIndia/") || (strUrl=="http://questdiagnostics.in/") || (strUrl=="http://www.questdiagnostics.in/") || (strUrl=="www.questdiagnostics.in") || (strUrl=="www.questdiagnostics.in/"))
               {
                
                document.getElementById("qdflash").style.display= "block";
                document.getElementById("smallFlash").style.display="none";
               }
               else
               {
                 document.getElementById("qdflash").style.display= "none";
                 document.getElementById("smallFlash").style.display="block";    
               }
   }
   else
   {
         //document.getElementById("qdflash").style.display= "none";   
         document.getElementById("smallFlash").style.display= "block";   
   }
   
}
