﻿



function $(id)
{
var item;
if (document.getElementById)
	{
		itm = document.getElementById(id);
	}
	else if (document.all)
	{
		itm = document.all[id];
	}
	else if (document.layers)
	{
		itm = document.layers[id];
	}
	
	return itm;

}

















function Trim(str)
{
   return str.replace(/^\s*|\s*$/g,"");

}

function hs(obj,value,TF)
{
if (! TF)
 $(obj).style.display=value;
else
{
  if ($(obj).style.display=='block')
  $(obj).style.display='none';
else
  $(obj).style.display='block';
}
}












	function $MC(msg,msgcancel)
{
 if (confirm(msg))
  {
         
         return true;
       }
       else {
          alert (msgcancel);
          return false;
       } 
  
}





















function go_to(url)
{

document.location.href=url;

}


/*Confirm Delete*/
function deletedata(url)
{
if ($MC('هل تريد فعلا بأن تتأخد هذا الإجراء','تم إلغاء الإجراء'))
{

go_to(url)

}

}


      function popup(strURL,intWinW,intWinH)
{	
	
		var strProperties = "menubar=no, resizable=yes,  "; 


		var intScreenW = parseInt(screen.width, 10); 
		var intScreenH = parseInt(screen.Height, 10); 
		var intWinT = (intScreenH - intWinH)/2; 
		var intWinL = (intScreenW - intWinW)/2;
		strProperties += 'height=' + intWinH + ', width=' + intWinW + ', top=' + intWinT + ', left=' + intWinL + ', status=no,scrollbars=yes,toolbar=no,location=no'; 
		var winObject = window.open(strURL, 'PageServices', strProperties, false); 
//		var winObject=window.open("../services/postFeedbackAction.aspx","","height="+intWinH+",width="+intWinW+",status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
		winObject.focus(); 
	
}

 




