var popWindow;
function openPopWindow(url,imgWidth,imgHeight) {
    var width = imgWidth+90;
    var height = imgHeight+70+150;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height +
'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0'+
        ",left=" + left + ",top=" + top +
        ",screenX=" + left + ",screenY=" + top;
    popWindow = window.open(url, "subWind", windowFeatures);
}
function BtnOn(id)
{

    id.style.backgroundImage=id.style.backgroundImage.replace('OFF','ON');

}
function BtnOFF(id)
{
    id.style.backgroundImage=id.style.backgroundImage.replace('ON','OFF');
}

function BtnOnOFF(id)
{
//var button=document.getElementById(id)
/*
	if(id.className=="MenuItemON")
		id.className="MenuItemOFF"
	else
		id.className="MenuItemON"	
*/
}
function ShowDetails(id)
{
var Target =document.getElementById(id);

	if(Target.className=="hTopic")
		Target.className="vTopic"
	else
	{
    	timeout()
    	Target.className='hTopic'

	}
//alert(Target.className);
}
function timeout() { 
setTimeout("replace()",3000); 
} 

function HideDetails(id)
{
alert(id)
/*var Target =document.getElementById(id);
Target.className='hTopic'
*/
}

var feildsStatus=1;
function frmVal(FeildName,fTitle)
{ 
	for(i=0;i<FeildName.length;i++)
	{
		eval('var flen=document.getElementById("send2F").'+FeildName[i]+'.value.length;');
		if(flen<=0)
		{
			alert('الرجاء إكمال الحقل المعنون بـ'+fTitle[i]+'');
			feildsStatus=0;
			eval('document.getElementById("send2F").'+FeildName[i]+'.focus();');
			return 0;
		}
		else
    	feildsStatus=1;
	}
	if(feildsStatus==1)
	document.getElementById("send2F").submit();
	

}
