//reloads the window if Nav4 resized----------------------------------------------------------
function MM_reloadPage(init) {  
  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);
//--------------------------------------------------------------------------------------------

//popup-------------------------------------------------------------------------------------
function openBrWindow(theURL) { 
  window.open('showpic.php?fulimg='+theURL,'shwPic','width=445,height=335,left='+((event.clientX)-450));
}

function openShwImgWin(fulimg, wit, hit) { 
  window.open('showpic.php?fulimg='+fulimg, 'ShwWin', 'width='+wit+',height='+hit+',left=400');
}

function openBrwWin(qry, wit, hit) { 
  window.open('phorder.php?'+qry, 'OrdWin', 'width='+wit+',height='+hit+',left=400');
}
//--------------------------------------------------------------------------------------------

//Add to favorite-----------------------------------------------------------------------------
//Copyright(c)2006. Fudex-Tech and Mortazah Annaser.
function add2fav(webUrl, webNam){
	
	window.external.AddFavorite( webUrl, webNam)
}
//--------------------------------------------------------------------------------------------

//Show-Hide-----------------------------------------------------------------------------------
//Copyright(c)2006. Fudex-Tech and Mortazah Annaser.
function ShwHid(Obj)
{
	var objToPrf = document.getElementById(Obj);
	if( objToPrf.style.display=='none' )
	{
		objToPrf.style.display='';
	}
	else
	{
		objToPrf.style.display='none';
	}
}

//--------------------------------------------------------------------------------------------

//Section NAvigation--------------------------------------------------------------------------
function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}
//--------------------------------------------------------------------------------------------


//Check empty---------------------------------------------------------------------------------
//Copyright(c)2006. Fudex-Tech and Mortazah Annaser.
function ckEmp(frm, fld, art, srk)
{
	var fld2ck = document.getElementById(fld);
	
	if( fld2ck.value=="" || fld2ck.value==srk )
	{
		alert(art);
		fld2ck.focus();
	}
	else
	{
		document.forms[frm].submit();
	}
}
//--------------------------------------------------------------------------------------------

//Adjust Print Div----------------------------------------------------------------------------
//Copyright(c)2007. Fudex-Tech and Mortazah Annaser.
function AstPrtDiv(aln)
{
	var pDiv = document.getElementById('prtDiv'),
		sDiv = document.getElementById('gtoPrtDiv'),
		getSitTtl = document.title,
    	setSitTtl=getSitTtl.split(':');
		
	pDiv.style.width=(document.body.scrollWidth)-20;
	pDiv.style.height=document.body.scrollHeight;
	pDiv.innerHTML='<div align="center" dir="rtl"><a href="javascript:void(0)" onclick="ShwHid(\'prtDiv\')"><img src="layout/global/x.gif" width="10" height="10" hspace="10" vspace="10" align="'+aln+'" border="0" title="Close" /></a><span class="fnt_ttl">'+getSitTtl+'</span>&nbsp;</div>'+sDiv.innerHTML+'<hr /><div align="center" class="fnt_small">'+window.location.href+'<br />'+setSitTtl[0]+'&copy;</div>';
	
	
	ShwHid('prtDiv');
}
//--------------------------------------------------------------------------------------------

//Menu----------------------------------------------------------------------------------------
//Copyright(c)2007. Fudex-Tech and Mortazah Annaser.
function MnuNorOvr(objId, objCls)
{
	var objToOvr = document.getElementById(objId);
	return objToOvr.className=objCls;
}

function GoToPhoSec(basUrl)
{
	var basSitUrl = basUrl==null || basUrl=='' ? basSitUrl = null : basSitUrl = basUrl;
	if( basSitUrl != null )	return window.location.href = basSitUrl;
	else return false;
}
//---------------------------------------------------------------------------------------------

//Misc-----------------------------------------------------------------------------------------
//Adjust vDts line
function adjElmHit()
{
	var docElm = document.getElementById('vDts2');
	if(docElm) docElm.height=(document.body.scrollHeight)-172;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//---------------------------------------------------------------------------------------------
