function smilie(code)
{

   var msgbox=document.getElementById('gbMessage')
   //alert(msgbox)
   msgbox.value=msgbox.value+code;
}
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);
}
ImgON = new Image();
ImgOFF = new Image();
ImgON.src = "http://www.alfaraj9.com/images/default/MenuON.gif";
ImgOFF.src = "http://www.alfaraj9.com/images/default/MenuOFF.gif";

function BtnOn(id)
{


   // id.style.backgroundImage=id.style.backgroundImage.replace('OFF','ON');
   //alert(id.style.backgroundImage);
   id.style.backgroundImage='url('+ImgON.src+')';

}
function BtnOFF(id)
{
    id.style.backgroundImage='url('+ImgOFF.src+')';
      // id.style.backgroundImage=ImgOFF.src;
    //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();
	

}

MenuON= new Image(188,25)
MenuON.src = "http://www.alfaraj9.com/images/default/MenuON.gif"

MenuOFF= new Image(188,25)
MenuOFF.src = "http://www.alfaraj9.com/images/default/MenuOFF.gif"

