// Fun List:
// function DoSearch()
// function MM_openBrWindow(theURL,winName,features)



function DoSearch()
{
	keyWord = document.searchF.keyWord.value;
	pageTemplate = document.searchF.seachIn.value+"?keyWord="+keyWord;
	if(pageTemplate != "") 
	{
		document.searchF.action = pageTemplate;
	}
	else
	{
		return false;	
	}	
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openZoomWindow(url)
{
  winWidth	= 470;
  winHeight = 420;
  screenW = screen.availWidth; 
  winLeftPos = (screenW - 400) / 2;
  window.open(url,'annInfo','width='+winWidth+',height='+winHeight+',left='+winLeftPos);
} 

function SetImgSise(imgPath)
{
	var img = new Image();
	img.src=imgPath;
	alert(img.width);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//Book Mark
	browsername=navigator.appName;
	browserversion=parseInt(navigator.appVersion);
	
	//Book Mark
	browsername=navigator.appName;
	browserversion=parseInt(navigator.appVersion);
	
	function bookmark(url,name)
	{
		//alert(name);
		
		if (browsername == "Microsoft Internet Explorer" & browserversion>=4)
		{
			window.external.AddFavorite(url,name);
		}
	}
	
	
	
	function OpenClose(itemId)
{
	if(document.all(itemId).style.display=="none")
	{
		if(document.all(itemId+"_pic") != null)
		{
			
				document.all(itemId+"_pic").src="/images/advice-red.gif";
		}
	
	
		if(document.all(itemId+"_css") != null)
		{
			
			document.all(itemId+"_css").className="title3"
				
		}
		document.all(itemId).style.display="block";
		
	}
	else if(document.all(itemId).style.display=="block")
	{
		if(document.all(itemId+"_pic") != null)
		{
			
				document.all(itemId+"_pic").src="/images/advice-green.gif";
		}
	
	
		if(document.all(itemId+"_css") != null)
		{
			
			document.all(itemId+"_css").className="text12Blue"
				
		}
		document.all(itemId).style.display="none";
	}
	else
	{
		if(document.all(itemId+"_pic") != null)
		{
			
				document.all(itemId+"_pic").src="/images/advice-red.gif";
		}
	
	
		if(document.all(itemId+"_css") != null)
		{
			
			document.all(itemId+"_css").className="title3"
				
		}
		document.all(itemId).style.display="block";
	}
		
		
}
	
	
	function alternate(id)
{ 
 if(document.getElementsByTagName)
 {  
   var table = document.getElementById(id);   
   var rows = table.getElementsByTagName("tr");   
   for(i = 0; i < rows.length; i++){           
 //manipulate rows 
     if(i % 2 == 0){ 
       rows[i].className = "even"; 
     }else{ 
       rows[i].className = "odd"; 
     }       
   } 
 } 
}

function window_onscroll()
{
//alert(pictTop);
	if(document.all)
		if(window.document.getElementById("floater"))
			window.document.getElementById("floater").style.top=document.body.scrollTop+170;///+pictTop;
}

function CloseFloater()
{
	window.document.getElementById("floater").style.display = "none";
}

function addBookmark(title,url) { 
 if (window.sidebar) { 
 window.sidebar.addPanel(title, url,""); 
 } else if( document.all ) { 
 window.external.AddFavorite( url, title); 
 } else if( window.opera && window.print ) { 
 return true; 
} 
} 

function OpenClose2(item_id)
{
	if(document.getElementById(item_id).style.display == "none")
		document.getElementById(item_id).style.display = "block";
	else
		document.getElementById(item_id).style.display = "none";
}
function closeAno()
{
	document.getElementById('floater_ad').style.display='none'
}
function closeByTime()
{
		setTimeout("closeAno()",30000);
}
closeByTime()
function preloader() 
{
	var i = 0;
	imageObj = new Image();
	images = new Array();
	images[0]="/images/searchbox_content_off.gif"
	images[1]="/images/searchbox_content_on.gif"
	images[2]="/images/searchbox_doctors_off.gif"
	images[3]="/images/searchbox_doctors_on.gif"
	for(i=0; i<=3; i++) {
		imageObj.src=images[i];
	}

}

function viewChildNav(element)
{
	document.getElementById(element).style.display="block";	
}
function offChildNav(element)
{
	document.getElementById(element).style.display="none";
}

