/////////////////////////////////////////////////////////////////////////////////////////////////////					
switch(window.screen.width )
{
	case 1024 :
		try
		{
			document.write("<LINK href=\"/FarzinSoft/Common/CStyles/CPageStyle_1024.css\" type=\"text/css\" rel=\"STYLESHEET\">");
		}
		catch(e){}		
		break;
	default :
		document.write("<LINK href=\"/FarzinSoft/Common/CStyles/CPageStyle_1024.css\" type=\"text/css\" rel=\"STYLESHEET\">");
		break;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////					
window.attachEvent("onload" , TabContentLoadingStatusNoneDisplay);
function TabContentLoadingStatusNoneDisplay()
{
	//----------- display loading status
	if(window.parent.TabContentLoadingStatus!=null && window.parent.TabContentLoadingStatus!="undefined")
		window.parent.TabContentLoadingStatus.style.display = "none";
	return;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////					
//Disable right mouse click Script
var message="Function Disabled!";
///////////////////////////////////
function clickIE4()
{
	if (event.button==2)
		return false;
}
function clickNS4(e)
{
	if (document.layers||document.getElementById&&!document.all)
	{
		if (e.which==2||e.which==3)
			return false;
	}
}
if (document.layers)
{
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById)
	document.onmousedown=clickIE4;
document.oncontextmenu = new Function("return false;");
/////////////////////////////////////////////////////////////////////////////////////////////////////					

//////////////////////////////////////////////////////////////////////////////////////////////
var iIntervalId ;
if ( ! iIntervalId )
	iIntervalId = window.setInterval( AttachEventToBody, 100 ) ;
//////////////////////////////////////////////////////////////////////////////////////////////
function AttachEventToBody()
{
	if(document.body != null)
	{
		document.body.attachEvent("onkeydown", OpenNewCardTable);
		window.clearInterval( iIntervalId ) ;
	}
}
//////////////////////////////////////////////////////////////////////////////////////////////
function OpenNewCardTable()
{
	if(event.keyCode == 123)
	{
		var iWidth  = parseInt(window.screen.width) - 30 ;
		var iHeight = parseInt(window.screen.height) - 120 ;

		var strFeatures = "Height="+iHeight+", Width="+iWidth+", left=0, top=0, resizable=no, help=no, status=no, scroll=no";	
		var strURL = "/FarzinSoft/eOrgan/Home/HomeFrm.aspx?SelSoft=746B271D02168914";
		var hwnd = window.open(strURL , "NEW" ,strFeatures,true);
		hwnd.focus();
	}
}
//////////////////////////////////////////////////////////////////////////////////////////////
function ShowMsg(Message, Type, Icon, Direction, arryProgress)  
{
	// arryProgress[0] : MinValue , arryProgress[1] : MaxValue
	
	var arryParams = new Array();
	arryParams[0] = (Type != null) ? Type : "OK";
	arryParams[1] = Message;
	arryParams[2] = (Icon != null) ? Icon : "warning";
	arryParams[3] = (Direction != null) ? Direction : "rtl";
	arryParams[4] = arryProgress;
	
	var dlgFetures = "dialogHeight:150px; dialogWidth:400px; dialogTop:center; resizable:yes; help:no; status:no; scroll:no;";	
	return window.showModalDialog("/FarzinSoft/Common/GeneralMessages/GeneralMsg.htm", arryParams, dlgFetures);
}

//////////////////////////////////////////////////////////////////////////////////////////////
function ConfirmMsg(Message, Type, Direction)
{
	var arryParams = new Array();
	arryParams[0] = (Type != null) ? Type : "YesNo";
	arryParams[1] = Message;
	arryParams[2] = "question";
	arryParams[3] = (Direction != null) ? Direction : "rtl";
	arryParams[4] = null;
	
	var dlgFetures = "dialogHeight:150px; dialogWidth:400px; dialogTop:center; resizable:yes; help:no; status:no; scroll:no;";	
	return window.showModalDialog("/FarzinSoft/Common/GeneralMessages/GeneralMsg.htm", arryParams, dlgFetures);
}
//////////////////////////////////////////////////////////////////////////////////////////////
function PromptMsg(Message, Type, Direction, Icon, Default)
{
	var arryParams = new Array();
	arryParams[0] = (Type != null) ? Type : "OKCANCEL";
	arryParams[1] = Message;
	arryParams[2] = Icon;
	arryParams[3] = (Direction != null) ? Direction : "rtl";
	arryParams[4] = Default;
	
	var dlgFetures = "dialogHeight:150px; dialogWidth:400px; dialogTop:center; resizable:yes; help:no; status:no; scroll:no;";	
	return window.showModalDialog("/FarzinSoft/Common/GeneralMessages/PromptMsg.htm", arryParams, dlgFetures);
}
//////////////////////////////////////////////////////////////////////////////////////////////

