// JavaScript Document

function hmFlash()
{
	document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="514" height="228"><param name="movie" value="flash/hmFlash.swf"><param name="wmode" value="transparent"><param name="quality" value="high"><param name="menu" value="false"><embed src="flash/hmFlash.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="514" height="228"></embed></object>');
}

							
function hmService()
{
	document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="262" height="228" id="Tawam_Home" name="Tawam_Home" swliveconnect="true" viewastext="VIEWASTEXT"><param name="movie" value="./flash/hmService.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="./flash/hmService.swf" width="262" height="228" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" id="Tawam_Home" name="Tawam_Home" swliveconnect="true" wmode="transparent"></embed></object>');
}

function hmServiceOld()
{
	document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="262" height="228"><param name="movie" value="flash/hmService.swf"><param name="wmode" value="transparent"><param name="quality" value="high"><param name="menu" value="false"><embed src="flash/hmService.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="262" height="228"></embed></object>');
}

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];}
}

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; }
}

	// DropDown Menu
 function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
   
    return curleft;
  }
function findPosY(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curleft += obj.y;
       
    return curleft;
    
  }
  
function callmenufun_sub(imgname,divname)
{  
var x1=findPosX(document.getElementById(imgname));  
var X2 = findPosY(document.getElementById(imgname));  
document.getElementById(divname).style.left=x1-148; 
document.getElementById(divname).style.top = X2-9;
}

function callmenufun(imgname,divname)
{
//alert(findPosX(document.getElementById(imgname)));	
var x1=findPosX(document.getElementById(imgname));
var X2 = findPosY(document.getElementById(imgname));  
document.getElementById(divname).style.left=(x1+document.getElementById(imgname).width)-150;
document.getElementById(divname).style.top = X2+24;
 
}
function  callmenufun_New(imgname,divname)
{
 
var x1=findPosX(document.getElementById(imgname));
var X2 = findPosY(document.getElementById(imgname));  
document.getElementById(divname).style.left=825
document.getElementById(divname).style.top = X2+1;
}
function callmenufun_sub_New(imgname,divname)
{  
var x1=findPosX(document.getElementById(imgname));  
var X2 = findPosY(document.getElementById(imgname));  
document.getElementById(divname).style.left=x1-268; 
document.getElementById(divname).style.top = X2-9;
}
/*function callfun()
{
var x1=findPosX(document.getElementById('Image1'));
document.getElementById('ddAbout').style.left=x1+60;
document.getElementById('ddPatient').style.left=x1+132;
document.getElementById('ddInPatient').style.left=x1+310;
document.getElementById('ddOnline').style.left=x1+310;
document.getElementById('ddOther').style.left=x1+310;
document.getElementById('ddMedical').style.left=x1+332;
document.getElementById('ddClinic').style.left=x1+440;
document.getElementById('ddContact').style.left=x1+680;
}*/

//window.onresize=callfun;
//window.onload=callfun;


function showPopup(URL)
{
  if (screen.width > 800)
	{
	window.open(URL,"","width=550,height=400,left=80,top=100,scrollbars=yes,resizable=yes,menubar=0,toolbar=0,status=yes")
	}
	else
	{
	window.open(URL,"","width=550,height=400,left=114,top=100,scrollbars=yes,resizable=yes,menubar=0,toolbar=0,status=yes")
	}
	}

function showPop(URL)
{
  if (screen.width > 800)
	{
	window.open(URL,"","width=650,height=470,left=80,top=100,scrollbars=yes,resizable=yes,menubar=0,toolbar=0,status=yes")
	}
	else
	{
	window.open(URL,"","width=650,height=470,left=114,top=100,scrollbars=yes,resizable=yes,menubar=0,toolbar=0,status=yes")
	}
	}	