if (window.Event)
  document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
	event.cancelBubble = true
	event.returnValue = false;

	return false;
}

function norightclick(e)
{
	if (window.Event)
	{
		if (e.which == 2 || e.which == 3)
			return false;
	}
	else
		if (event.button == 2 || event.button == 3)
		{
			event.cancelBubble = true
			event.returnValue = false;
			return false;
		}

}

document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;


function CreateWindow(URL,TYPE,WIDTH,HEIGH)

{var Ow=OpenWindow("E",WIDTH,HEIGH,"","","no","no","yes","yes","no",URL,TYPE);}

function OpenWindow(strName,iW,iH,TOP,LEFT,R,S,SC,T,TB,URL,TYPE,dArg)

{


	if (TYPE=="modal" || TYPE=="modalIframe")

	{

		var sF=""
	
	var _rv

	
	sF+=T?'unadorned:'+T+';':'';

		sF+=TB?'help:'+TB+';':'';
	
	sF+=S?'status:'+S+';':'';
	
	sF+=SC?'scroll:'+SC+';':'';
	
	sF+=R?'resizable:'+R+';':'';
	
	sF+=iW?'dialogWidth:'+iW+'px;':'';
		
sF+=iH?'dialogHeight:'+(parseInt(iH)+(S?42:0))+'px;':'';
		
sF+=TOP?'dialogTop:'+TOP+'px;':'';
		sF+=LEFT?'dialogLeft:'+LEFT+'px;':'';


		if (TYPE=="modal") 
_rv=window.showModalDialog(URL+"&r="+Math.round(Math.random()*1000000),dArg?dArg:"",sF);
	
	else

		{

			var da=new Object()

			da.w=iW;
			da.h=iH;

			da.url=URL;

			_rv=window.showModalDialog(URL+"?r="+Math.round(Math.random()*1000000),da,sF);
	
	}

		if ("undefined" != typeof(_rv) )
 return _rv;

	}

	else
	{
		
var sF=""
		
sF+=iW?'width='+iW+',':'';
		sF+=iH?'height='+iH+',':'';

		sF+=R?'resizable='+R+',':'';

		sF+=S?'status='+S+',':'';

		sF+=SC?'scrollbars='+SC+',':'';

		sF+=T?'titlebar='+T+',':'';

		sF+=TB?'toolbar='+TB+',':'';
	
	sF+=TB?'menubar='+TB+',':'';

		sF+=TOP?'top='+TOP+',':'';

		sF+=LEFT?'left='+LEFT+',':'';

		return window.open(URL?URL:'about:blank',strName?strName:'',sF).focus()

	}
}

function Err(Err)
{
var UR="error_modalshell.asp?Err="+Err;
var  RV=OWO("Error","399","150","","","no","no","no","no","no",UR,"modal");
}


function OWO(strName,iW,iH,TOP,LEFT,R,S,SC,T,TB,URL,TYPE,dArg)
{
if (TYPE=="modal" || TYPE=="modalIframe")
{
var sF=""
var _rv
sF+=T?'unadorned:'+T+';':'';
sF+=TB?'help:'+TB+';':'';
sF+=S?'status:'+S+';':'';
sF+=SC?'scroll:'+SC+';':'';
sF+=R?'resizable:'+R+';':'';
sF+=iW?'dialogWidth:'+iW+'px;':'';
sF+=iH?'dialogHeight:'+iH+'px;':'';
sF+=TOP?'dialogTop:'+TOP+'px;':'';
sF+=LEFT?'dialogLeft:'+LEFT+'px;':'';
if (TYPE=="modal")
_rv=window.showModalDialog(URL+"&r="+Math.round(Math.random()*1000000),dArg?dArg:"",sF);
else
{
var da=new Object()
da.w=iW;
da.h=iH;
da.url=URL;
_rv=window.showModalDialog("/cgi-bin/dasp/ModalIframe.asp?r="+Math.round(Math.random()*1000000),da,sF);
}
if ("undefined" != typeof(_rv) )
return _rv;
}
else
{
var sF=""
sF += iW?'width='+iW+',':'';
sF+=iH?'height='+iH+',':'';
sF+=R?'resizable='+R+',':'';
sF+=S?'status='+S+',':'';
sF+=SC?'scrollbars='+SC+',':'';
sF+=T?'titlebar='+T+',':'';
sF+=TB?'toolbar='+TB+',':'';
sF+=TB?'menubar='+TB+',':'';
sF+=TOP?'top='+TOP+',':'';
sF+=LEFT?'left='+LEFT+',':'';
var HMW=window.open(URL?URL:'about:blank',strName?strName:'',sF);
if ( (document.window != null) && (!HMW.opener) )
HMW.opener=document.window;
HMW.focus();
}
}


function foo(){close();}


function MU(e){e.className="CellButtonOff";}
function MO(e){e.className="CellButtonOn";}

function doneprint(){if (window.print) {javascript:window.print();}}

function chStatus(pagetitle){window.status = pagetitle;}


//1)حدد مدة التحميل بالثواني
var duration=1

//2) غير عنوان الصفحة التي سينقلك اليها المتصفح
function postaction(){
var gop =document.redirectform.pID.value;
if(gop == 1){window.location="default.aspx"};
if(gop == 2){window.location="xprofile.aspx"};
if(gop == 3){window.location="xusermails.aspx"};
if(gop == 4){window.location="xadmboard.aspx"};
if(gop == 6){window.location="xadmprvmsg.aspx"};
}

///لا تغير شي بعد هذا الفاصل/////////////
var clipright=0
var widthIE=0
var widthNS=0

function initializebar(){
if (document.all){
baranchor.style.visibility="visible"
widthIE=bar.style.pixelWidth
startIE=setInterval("increaseIE()",50)
}
if (document.layers){
widthNS=document.baranchorNS.document.barbackgroundNS.clip.width
document.baranchorNS.document.barNS.clip.right=0
document.baranchorNS.visibility="show"

startNS=setInterval("increaseNS()",50)
}
}

function increaseIE(){
bar.style.clip="rect(0 "+clipright+" auto 0)"
window.status="Loading..."
if (clipright<widthIE)
clipright=clipright+(widthIE/(duration*20))
else{
window.status=''
clearInterval(startIE)
postaction()
}
}

function increaseNS(){
if (clipright<202){
window.status="Loading..."
document.baranchorNS.document.barNS.clip.right=clipright
clipright=clipright+(widthNS/(duration*20))
}
else{
window.status=''
clearInterval(startNS)
postaction()
}
}