var dialogIsOpen = 0 ;ഀ
var DialogPrev_overflowX, DialogPrev_overflowY;ഀ
var delimiter = "$$$";ഀ
var messageBox_nextFunction;ഀ
ഀ
function shLayers()ഀ
{ഀ
// Disableഀ
	document.write("<div id=\"disableLayer\" style=\"padding:0px; position: absolute; width: 10px; height: 230px; z-index: 1; background-color: #FFFFFF; visibility:hidden; left:0; top:0; filter:Alpha(Opacity=70, Style=0)\"></div>");ഀ
	ഀ
// Shadowഀ
	document.write("<div id=\"shadowLayer\" style=\"padding:0px; position: absolute; width: 10px; height: 230px; z-index: 2; background-color: #000000; visibility:hidden; left:0; top:0; filter:Alpha(Opacity=30, Style=0)\"></div>");ഀ
	ഀ
// Loading Boxഀ
	document.write("<div id=\"loadingBox\" style=\"border:3px solid #000000; position: absolute; width: 192px; height: 150px; z-index: 2; padding-left: 0px; padding-right: 0px; padding-top: 1px; padding-bottom: 1px; background-color: #ffffff; visibility:hidden; left:1px; top:1px\" >");ഀ
document.write("<BR><p align=\"center\" dir=\"rtl\"><img id=\"loadingImage\" border=\"0\" src=\"Images/Icon_loading.gif\" ><font face=\"tahoma\" size=\"2\"><br>صبر کنيد...</font></div>");ഀ
ഀ
ഀ
}ഀ
ഀ
//1: Alert  / 2: Errpr   / 3: OKഀ
function messageBoxShow(type,title,message)ഀ
{ഀ
	if (type == 1)ഀ
	{ഀ
		formTemplateMsg.style.borderColor = "#A6A600";ഀ
//		formTemplateMsgButton.style.borderColor = "#A6A600";ഀ
//		formTemplateMsgIcon.src = "Images/icon_alert.gif";ഀ
	}ഀ
	elseഀ
	{ഀ
		formTemplateMsg.style.borderColor = "#A60000";ഀ
//		formTemplateMsgButton.style.borderColor = "#A60000";ഀ
//		formTemplateMsgIcon.src = "Images/icon_error.gif";ഀ
	}ഀ
	formTemplateMsgTitle.innerHTML = title;ഀ
	formTemplateMsgBody.innerHTML = message;ഀ
	showDialog("formTemplateMsg");ഀ
}	ഀ
ഀ
ഀ
ഀ
// =------------------ AJAXഀ
function GetXmlHttpObject()ഀ
{ ഀ
	var objXMLHttp=null;ഀ
	if (window.XMLHttpRequest)ഀ
		objXMLHttp=new XMLHttpRequest();ഀ
	else if (window.ActiveXObject)ഀ
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");ഀ
	return objXMLHttp;ഀ
}ഀ
ഀ
function ajDecode(txt)ഀ
{ഀ
	if (txt == "") ഀ
		return "";ഀ
	txt = replaceSubstring(txt, "^01", "آ");ഀ
	txt = replaceSubstring(txt, "^02", "ا");ഀ
	txt = replaceSubstring(txt, "^03", "ب");ഀ
	txt = replaceSubstring(txt, "^04","پ");ഀ
	txt = replaceSubstring(txt, "^05","ت");ഀ
	txt = replaceSubstring(txt, "^06","ث");ഀ
	txt = replaceSubstring(txt, "^07","ج");ഀ
	txt = replaceSubstring(txt, "^08","چ");ഀ
	txt = replaceSubstring(txt, "^09","ح");ഀ
	txt = replaceSubstring(txt, "^10","خ");ഀ
	txt = replaceSubstring(txt, "^11","د");ഀ
	txt = replaceSubstring(txt, "^12","ذ");ഀ
	txt = replaceSubstring(txt, "^13","ر");ഀ
	txt = replaceSubstring(txt, "^14","ز");ഀ
	txt = replaceSubstring(txt, "^15","ژ");ഀ
	txt = replaceSubstring(txt, "^16","س");ഀ
	txt = replaceSubstring(txt, "^17","ش");ഀ
	txt = replaceSubstring(txt, "^18","ص");ഀ
	txt = replaceSubstring(txt, "^19","ض");ഀ
	txt = replaceSubstring(txt, "^20","ط");ഀ
	txt = replaceSubstring(txt, "^21","ظ");ഀ
	txt = replaceSubstring(txt, "^22","ع");ഀ
	txt = replaceSubstring(txt, "^23","غ");ഀ
	txt = replaceSubstring(txt, "^24","ف");ഀ
	txt = replaceSubstring(txt, "^25","ق");ഀ
	txt = replaceSubstring(txt, "^26","ک");ഀ
	txt = replaceSubstring(txt, "^27","گ");ഀ
	txt = replaceSubstring(txt, "^28","ل");ഀ
	txt = replaceSubstring(txt, "^29","م");ഀ
	txt = replaceSubstring(txt, "^30","ن");ഀ
	txt = replaceSubstring(txt, "^31","و");ഀ
	txt = replaceSubstring(txt, "^32","ه");ഀ
	txt = replaceSubstring(txt, "^33","ئ");ഀ
	txt = replaceSubstring(txt, "^34","ی");ഀ
	txt = replaceSubstring(txt, "^35","ی");ഀ
	txt = replaceSubstring(txt, "^36","ي");ഀ
	txt = replaceSubstring(txt, "^40","،");ഀ
	txt = replaceSubstring(txt, "^41","؟");ഀ
	txt = replaceSubstring(txt, "&s;","^");ഀ
	return(txt);ഀ
}ഀ
ഀ
function ajEncode(txt)ഀ
{ഀ
	if (txt=="")ഀ
		return "";ഀ
	txt = replaceSubstring(txt, "^","&s;");ഀ
	txt = replaceSubstring(txt, "آ","^01");ഀ
	txt = replaceSubstring(txt, "ا","^02");ഀ
	txt = replaceSubstring(txt, "ب","^03");ഀ
	txt = replaceSubstring(txt, "پ","^04");ഀ
	txt = replaceSubstring(txt, "ت","^05");ഀ
	txt = replaceSubstring(txt, "ث","^06");ഀ
	txt = replaceSubstring(txt, "ج","^07");ഀ
	txt = replaceSubstring(txt, "چ","^08");ഀ
	txt = replaceSubstring(txt, "ح","^09");ഀ
	txt = replaceSubstring(txt, "خ","^10");ഀ
	txt = replaceSubstring(txt, "د","^11");ഀ
	txt = replaceSubstring(txt, "ذ","^12");ഀ
	txt = replaceSubstring(txt, "ر","^13");ഀ
	txt = replaceSubstring(txt, "ز","^14");ഀ
	txt = replaceSubstring(txt, "ژ","^15");ഀ
	txt = replaceSubstring(txt, "س","^16");ഀ
	txt = replaceSubstring(txt, "ش","^17");ഀ
	txt = replaceSubstring(txt, "ص","^18");ഀ
	txt = replaceSubstring(txt, "ض","^19");ഀ
	txt = replaceSubstring(txt, "ط","^20");ഀ
	txt = replaceSubstring(txt, "ظ","^21");ഀ
	txt = replaceSubstring(txt, "ع","^22");ഀ
	txt = replaceSubstring(txt, "غ","^23");ഀ
	txt = replaceSubstring(txt, "ف","^24");ഀ
	txt = replaceSubstring(txt, "ق","^25");ഀ
	txt = replaceSubstring(txt, "ک","^26");ഀ
	txt = replaceSubstring(txt, "گ","^27");ഀ
	txt = replaceSubstring(txt, "ل","^28");ഀ
	txt = replaceSubstring(txt, "م","^29");ഀ
	txt = replaceSubstring(txt, "ن","^30");ഀ
	txt = replaceSubstring(txt, "و","^31");ഀ
	txt = replaceSubstring(txt, "ه","^32");ഀ
	txt = replaceSubstring(txt, "ئ","^33");ഀ
	ഀ
	txt = replaceSubstring(txt, "&#1740;","^34");ഀ
	txt = replaceSubstring(txt, "ی","^35");ഀ
	txt = replaceSubstring(txt, "ي","^36");ഀ
	ഀ
	txt = replaceSubstring(txt, "،","^40");ഀ
	txt = replaceSubstring(txt, "^؟","41");ഀ
	return(txt);ഀ
}ഀ
ഀ
// for generating and pass a Random ID to Internal ASPsഀ
function TC()ഀ
{ഀ
	return Math.floor(Math.random()*100000000);ഀ
}ഀ
ഀ
ഀ
function callAsp(pageName, parameter , targetFunction)ഀ
{ഀ
	xmlHttp=GetXmlHttpObject();ഀ
	if (xmlHttp==null)ഀ
		return;ഀ
	var url = pageName;ഀ
	url += "?" + parameter + "&tc=" + TC();ഀ
 	eval("xmlHttp.onreadystatechange = "+targetFunction);ഀ
 	xmlHttp.open("POST",url,true);ഀ
 	xmlHttp.send(null);ഀ
}ഀ
ഀ
// define Classഀ
function formFieldClass()ഀ
{ഀ
	// type: T=text, A=AreaBox, C= Combobox, D=DropDown, R=Radio, B=checkBoxഀ
	this.name  = "";ഀ
	this.type = "T";ഀ
}ഀ
ഀ
function formField_clearAll(variable)ഀ
{ഀ
	var iLoop;ഀ
	for (iLoop=0;iLoop<variable.length;iLoop++)ഀ
	{ഀ
		if (variable[iLoop].type=="L")ഀ
			document.getElementById(variable[iLoop].name).innerText = "";ഀ
		else if (variable[iLoop].type=="T")ഀ
			setFieldValue(variable[iLoop].name,"");ഀ
		else if (variable[iLoop].type=="C")ഀ
			document.getElementById(variable[iLoop].name).selectedIndex = 0;ഀ
		else if (variable[iLoop].type=="B")ഀ
			document.getElementById(variable[iLoop].name).checked = false;ഀ
		else if (variable[iLoop].type=="I")ഀ
			document.getElementById(variable[iLoop].name).src = "";ഀ
	}ഀ
}ഀ
ഀ
// formFieldVariable is an array of fieldClassഀ
// give a Stream (Usually from ASP) and give the format. This function fill the fieldsഀ
// fomrat: 0,2,3,4 ഀ
function formField_fillByStream(formFieldVariable, inputText, formatStream)ഀ
{ഀ
	var fieldIndex, fieldValue, theField;ഀ
	while (formatStream.length > 0)ഀ
	{ഀ
		fieldIndex = popCodedTxt(formatStream,",");ഀ
		fieldValue = popCodedTxt(inputText);ഀ
//		alert(fieldIndex)ഀ
//		alert(inputText)ഀ
		if (fieldIndex!="-1")ഀ
		{ഀ
			theField = formFieldVariable[fieldIndex];ഀ
			if (theField.type=="L")ഀ
				document.getElementById(theField.name).innerHTML = fieldValue ;ഀ
			else if (theField.type == "T")ഀ
				setFieldValue(theField.name,fieldValue);ഀ
			else if (theField.type=="C")ഀ
				document.getElementById(theField.name).selectedIndex = fieldValue;ഀ
			else if (theField.type == "B")ഀ
				document.getElementById(theField.name).checked = fieldValue;ഀ
			else if (theField.type == "I")ഀ
				document.getElementById(theField.name).src = fieldValue;ഀ
		}		ഀ
		formatStream = nextCodedTxt(formatStream,",");ഀ
		inputText = nextCodedTxt(inputText);ഀ
	}ഀ
}ഀ
ഀ
// ------ SHOW WAIT message for Cellഀ
function activeWait4Cell(cellName)ഀ
{ഀ
	document.getElementById(cellName).innerText = "لطفاً صبر کنيد...";ഀ
	document.getElementById(cellName).bgColor = "FFFF00";ഀ
}ഀ
function deActiveWait4Cell(cellName)ഀ
{ഀ
	document.getElementById(cellName).innerText = "";ഀ
	document.getElementById(cellName).bgColor = "ADD8E4";ഀ
}ഀ
ഀ
ഀ
// -------------------------------------------------------------------ഀ
// ------------------- FARSI functionsഀ
function chr(c) ഀ
{ ഀ
	h=String.fromCharCode(c);ഀ
	return h;ഀ
}ഀ
ഀ
function getRadioCheckedValue(radioObj) {ഀ
alert(userVote.value)ഀ
	if(!radioObj)ഀ
		return "";ഀ
	var radioLength = radioObj.length;ഀ
	if(radioLength == undefined)ഀ
		if(radioObj.checked)ഀ
			return radioObj.value;ഀ
		elseഀ
			return "";ഀ
	for(var i = 0; i < radioLength; i++) {ഀ
		if(radioObj[i].checked) {ഀ
			return radioObj[i].value;ഀ
		}ഀ
	}ഀ
	return "";ഀ
}ഀ
function Asci2Chr(tmp)ഀ
{ഀ
	if (tmp.indexOf("-")==0)ഀ
		tmp = tmp.substring(1);ഀ
	var tmp1="";ഀ
	while (tmp.length>0)ഀ
	{ഀ
		if (tmp.indexOf("-")>0)ഀ
		{ഀ
			tmp1=tmp1+chr(tmp.substring(0,tmp.indexOf("-"))*1);ഀ
			tmp=tmp.substring(tmp.indexOf("-")+1);ഀ
		}ഀ
	elseഀ
   		{ഀ
   			tmp1=tmp1+chr(tmp*1);ഀ
   			tmp="" ;ഀ
   		}ഀ
  	}ഀ
  	ഀ
 	return(tmp1) ;ഀ
} ഀ
ഀ
ഀ
function UniC(ff)ഀ
{ഀ
	dd="";ഀ
	for (u=0;u<ff.length;u++)ഀ
		dd=dd+"-"+ff.charCodeAt(u);ഀ
	return dd;  ഀ
}ഀ
ഀ
// -------------------------------------------------------------------ഀ
// ------------------------------- Eventsഀ
function getOnlyNo()ഀ
{ഀ
	var key;ഀ
	if (window.event)ഀ
		key = window.event.keyCode;ഀ
	else if (event)ഀ
		key = event.which;ഀ
	if ((key >= 48) && (key <= 57))ഀ
		return(true);ഀ
	elseഀ
		return(false);ഀ
}ഀ
ഀ
ഀ
// --------------------- Accessoriesഀ
function replaceSubstring(inputString, fromString, toString) {ഀ
   // Goes through the inputString and replaces every occurrence of fromString with toStringഀ
   var temp = inputString;ഀ
   if (fromString == "") {ഀ
      return inputString;ഀ
   }ഀ
   if (toString.indexOf(fromString) == -1) { // If the string being replaced is not a part of the replacement string (normal situation)ഀ
      while (temp.indexOf(fromString) != -1) {ഀ
         var toTheLeft = temp.substring(0, temp.indexOf(fromString));ഀ
         var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);ഀ
         temp = toTheLeft + toString + toTheRight;ഀ
      }ഀ
   } else { // String being replaced is part of replacement string (like "+" being replaced with "++") - prevent an infinite loopഀ
      var midStrings = new Array("~", "`", "_", "^", "#");ഀ
      var midStringLen = 1;ഀ
      var midString = "";ഀ
      // Find a string that doesn't exist in the inputString to be usedഀ
      // as an "inbetween" stringഀ
      while (midString == "") {ഀ
         for (var i=0; i < midStrings.length; i++) {ഀ
            var tempMidString = "";ഀ
            for (var j=0; j < midStringLen; j++) { tempMidString += midStrings[i]; }ഀ
            if (fromString.indexOf(tempMidString) == -1) {ഀ
               midString = tempMidString;ഀ
               i = midStrings.length + 1;ഀ
            }ഀ
         }ഀ
      } // Keep on going until we build an "inbetween" string that doesn't existഀ
      // Now go through and do two replaces - first, replace the "fromString" with the "inbetween" stringഀ
      while (temp.indexOf(fromString) != -1) {ഀ
         var toTheLeft = temp.substring(0, temp.indexOf(fromString));ഀ
         var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);ഀ
         temp = toTheLeft + midString + toTheRight;ഀ
      }ഀ
      // Next, replace the "inbetween" string with the "toString"ഀ
      while (temp.indexOf(midString) != -1) {ഀ
         var toTheLeft = temp.substring(0, temp.indexOf(midString));ഀ
         var toTheRight = temp.substring(temp.indexOf(midString)+midString.length, temp.length);ഀ
         temp = toTheLeft + toString + toTheRight;ഀ
      }ഀ
   } // Ends the check to see if the string being replaced is part of the replacement string or notഀ
   return temp; // Send the updated string back to the userഀ
} // Ends the "replaceSubstring" functionഀ
function setFieldFocus(id)ഀ
{ഀ
	document.getElementById(id).focus();ഀ
}ഀ
function setFieldEmpty(id)ഀ
{ഀ
	document.getElementById(id).value = "";ഀ
}ഀ
function getFieldValue(id)ഀ
{ഀ
	return (document.getElementById(id).value);ഀ
}ഀ
function setFieldValue(id,txt,addFlag)ഀ
{ഀ
	if (addFlag==0 || addFlag == null)ഀ
		document.getElementById(id).value = txt;ഀ
	elseഀ
		document.getElementById(id).value += txt;ഀ
}ഀ
function setFieldDisable(id, situation)ഀ
{ഀ
	if (situation==null)ഀ
		situation = true;ഀ
	document.getElementById(id).disabled = situation;ഀ
}ഀ
ഀ
function setFieldVisible(id, situation)ഀ
{ഀ
	document.getElementById(id).style.visibility = "visible";ഀ
}ഀ
function setFieldHidden(id, situation)ഀ
{ഀ
	document.getElementById(id).style.visibility = "hidden";ഀ
}ഀ
ഀ
function getComboValue(id)ഀ
{ഀ
	return (document.getElementById(id).options[document.getElementById(id).selectedIndex].text);ഀ
}ഀ
ഀ
function setComboIndexByText(id,txt)ഀ
{ഀ
	for (var i=0;i<document.getElementById(id).options.length;i++)ഀ
	{ഀ
		if (document.getElementById(id).options[i].text==txt)ഀ
			document.getElementById(id).selectedIndex = i;ഀ
	}ഀ
}ഀ
function setComboIndexByValue(id,value)ഀ
{ഀ
	for (var i=0;i<document.getElementById(id).options.length;i++)ഀ
	{ഀ
		if (document.getElementById(id).options[i].value==value)ഀ
			document.getElementById(id).selectedIndex = i;ഀ
	}ഀ
}ഀ
ഀ
ഀ
// --------------------- Get number formatsഀ
function getNumberFormat(n)	// 23000 -> 23,000ഀ
{ഀ
	var arr=new Array('0'), i=0; ഀ
	while (n>0) ഀ
    {ഀ
    	arr[i]='' + n%1000; n=Math.floor(n/1000); i++;ഀ
    }ഀ
  	arr=arr.reverse();ഀ
  	for (var i in arr) ഀ
  		if (i>0) //padding zerosഀ
    		while (arr[i].length<3) arr[i]='0'+arr[i];ഀ
  	return arr.join();ഀ
}ഀ
function getDigitFormat(n)	// 23,000 -> 23000ഀ
{ഀ
	var txt;ഀ
	var pos;ഀ
	while (n.indexOf(",")!=-1)ഀ
	{ഀ
		pos = n.indexOf(",");ഀ
		n = n.substring(0,pos) + n.substring(pos+1);ഀ
	}ഀ
	return n;ഀ
}ഀ
ഀ
// 	digitഀ
// ==========================ഀ
function getDigit(id)ഀ
{ഀ
	var key ;ഀ
	if (window.event) ഀ
		key = window.event.keyCode;ഀ
	else if (event)ഀ
		key = event.which;ഀ
ഀ
	if (key==13)ഀ
		if (window.event) ഀ
			window.event.keyCode = 9;ഀ
		else if (event)ഀ
			event.which = 9 ;ഀ
		ഀ
		if ( ((key >= 48) && (key <= 57)) || ((key >= 96) && (key <= 105)) || (key == 8) || (key==46) || (key==39) || (key==37) || (key==8) || (key==13) || (key==9)) // Delete, BackSpaceഀ
		return(true);ഀ
	elseഀ
		return(false);ഀ
}ഀ
ഀ
// --------------------- POP and NEXTCODEDഀ
function popCodedTxt(txt, myDelimiter)ഀ
{ഀ
	if (myDelimiter == null)ഀ
		myDelimiter = delimiter;ഀ
	var tempTxt;ഀ
	tempTxt = txt.substring(0,txt.indexOf(myDelimiter));ഀ
//	txt = nextCodedTxt(txt,myDelimiter);ഀ
	return tempTxt;ഀ
}ഀ
function nextCodedTxt(txt, myDelimiter)ഀ
{ഀ
	if (myDelimiter == null)ഀ
		myDelimiter = delimiter;ഀ
	var tempTxt;ഀ
	txt = txt.substring(txt.indexOf(myDelimiter)+myDelimiter.length);ഀ
	return txt;ഀ
}ഀ
ഀ
ഀ
ഀ
function giveNChar(txt,n)ഀ
{ഀ
	while (txt.length < n)ഀ
	{	txt = "0" + txt; }ഀ
	return txt;ഀ
}ഀ
ഀ
// --------------------- GET DATEഀ
function getJustYear(txt)ഀ
{ഀ
	return txt.substr(0,txt.indexOf('/',0));ഀ
}ഀ
ഀ
function getJustMonth(txt)ഀ
{ഀ
	var y1=txt.substr(0,txt.indexOf('/',0));ഀ
	txt=txt.substr(txt.indexOf('/',0)+1);ഀ
	return giveNChar(txt.substr(0,txt.indexOf('/',0)),2);ഀ
}ഀ
ഀ
function getJustDay(txt)ഀ
{ഀ
	var y1=txt.substr(0,txt.indexOf('/',0));ഀ
	txt=txt.substr(txt.indexOf('/',0)+1);ഀ
	var m1=txt.substr(0,txt.indexOf('/',0));ഀ
	return giveNChar(txt.substr(txt.indexOf('/',0)+1),2);ഀ
}ഀ
ഀ
ഀ
// --------------------- Disable / Enable Screenഀ
function activeDisable(layerName)ഀ
{ഀ
	if (layerName == null)ഀ
		layerName = "disableLayer";ഀ
	DialogPrev_overflowX = document.body.style.overflowX ;ഀ
	DialogPrev_overflowY = document.body.style.overflowY ;ഀ
	document.body.style.overflowX="hidden" ;ഀ
	document.body.style.overflowY="hidden" ;ഀ
	document.getElementById(layerName).style.width = document.body.clientWidth*1+100;ഀ
	document.getElementById(layerName ).style.height = document.body.clientHeight*1+100;ഀ
	// Disable all fields by disable Layerഀ
	setFieldVisible(layerName );ഀ
	ഀ
}ഀ
ഀ
function deactiveDisable(layerName)ഀ
{ഀ
	// Enable all fieldsഀ
	if (layerName == null)ഀ
		layerName = "disableLayer";ഀ
	document.getElementById(layerName).style.width = 1;ഀ
	document.getElementById(layerName ).style.height = 1;ഀ
	document.body.style.overflowY = DialogPrev_overflowY ;ഀ
	document.body.style.overflowX = DialogPrev_overflowX ;ഀ
	setFieldHidden(layerName);ഀ
}ഀ
ഀ
//	-----------------------------------------------------ഀ
//	----------------- Dialog functionsഀ
//	-----------------------------------------------------ഀ
function showDialog(dialogName,disableLayerFlag)ഀ
{ഀ
	if (dialogIsOpen == 0)ഀ
	{ഀ
		// go to topഀ
		if (disableLayerFlag != 0) ഀ
		{ഀ
			if (navigator.appName.indexOf("Explorer")!=-1)ഀ
				document.getElementById("disableLayer").style.top = document.body.scrollTop;ഀ
			else ഀ
				document.getElementById("disableLayer").style.top = window.pageYOffset;ഀ
			activeDisable();ഀ
		}ഀ
ഀ
		var width = document.getElementById(dialogName).clientWidth;ഀ
		var height = document.getElementById(dialogName).clientHeight;ഀ
		var layerTop, layerLeft;ഀ
		ഀ
		if (navigator.appName.indexOf("Explorer")!=-1)ഀ
			layerTop = document.body.scrollTop + document.body.clientHeight/2 - height/2;ഀ
		else ഀ
			layerTop = window.pageYOffset + document.body.clientHeight/2 - height/2;ഀ
		layerLeft = document.body.clientWidth/2 - width/2;ഀ
ഀ
		document.getElementById(dialogName).style.top = layerTop;ഀ
		document.getElementById(dialogName).style.left = layerLeft;ഀ
ഀ
//		document.getElementById("shadowLayer").style.top = layerTop + 10;ഀ
//		document.getElementById("shadowLayer").style.left = layerLeft + 10;ഀ
//		document.getElementById("shadowLayer").style.width = width;ഀ
//		document.getElementById("shadowLayer").style.height = height ;ഀ
		ഀ
ഀ
		document.getElementById(dialogName).style.visibility = "visible";ഀ
//		if (dialogName != "disableLayer")ഀ
//			document.getElementById("shadowLayer").style.visibility = "visible";ഀ
ഀ
		dialogIsOpen = 1;ഀ
	}	ഀ
}ഀ
function closeDialog(dialogName,disableLayerFlag)ഀ
{ഀ
//	if (dialogIsOpen == 1)ഀ
	{ഀ
		if (disableLayerFlag != 0) ഀ
			deactiveDisable();ഀ
		document.getElementById(dialogName).style.visibility = "hidden";ഀ
		document.getElementById("shadowLayer").style.visibility = "hidden";ഀ
		dialogIsOpen = 0;ഀ
	}	ഀ
}ഀ
ഀ
var dragapproved=false;ഀ
var z,zShadowFlag,x,y;ഀ
function move()ഀ
{ഀ
	if (event.button==1&&dragapproved){ഀ
		z.style.pixelLeft=temp1+event.clientX-x;ഀ
		z.style.pixelTop=temp2+event.clientY-y;ഀ
		if (zShadowFlag==1)ഀ
		{ഀ
			document.getElementById("shadowLayer").style.pixelLeft=temp1+event.clientX-x+10;ഀ
			document.getElementById("shadowLayer").style.pixelTop=temp2+event.clientY-y+10;ഀ
		}ഀ
		return false;ഀ
	}ഀ
}ഀ
	ഀ
function drags()ഀ
{ഀ
	if (!document.all)ഀ
		return;ഀ
	if (event.srcElement.className=="drag")ഀ
	{ഀ
		dragapproved=true;ഀ
		ഀ
/*		if (event.srcElement.id=="memberEditLayerHead")ഀ
		{ഀ
			z = document.getElementById("memberEditLayer");ഀ
			zShadowFlag = 1;ഀ
		}	ഀ
		else if (event.srcElement.id=="memberListLayerHead")ഀ
		{ഀ
			z = document.getElementById("memberListLayer");ഀ
			zShadowFlag = 1;ഀ
		}	ഀ
		else if (event.srcElement.id=="memberDetailLayerHead")ഀ
		{ഀ
			z = document.getElementById("memberDetailLayer");ഀ
			zShadowFlag = 1;ഀ
		}	ഀ
		else if (event.srcElement.id=="bookDetailLayerHead")ഀ
		{ഀ
			z = document.getElementById("bookDetailLayer");ഀ
			zShadowFlag = 1;ഀ
		}	ഀ
		else if (event.srcElement.id=="bookEditLayerHead")ഀ
		{ഀ
			z = document.getElementById("bookEditLayer");ഀ
			zShadowFlag = 1;ഀ
		}	ഀ
		else if (event.srcElement.id=="giveFormLayerHead")ഀ
		{ഀ
			z = document.getElementById("giveFormLayer");ഀ
			zShadowFlag = 1;ഀ
		}	ഀ
		ഀ
		elseഀ
			zShadowFlag = 0;ഀ
*/		ഀ
		z = document.getElementById( (event.srcElement.id).substring(0,(event.srcElement.id).indexOf("Head")) );ഀ
		zShadowFlag = 1;ഀ
ഀ
		ഀ
		temp1=z.style.pixelLeft;ഀ
		temp2=z.style.pixelTop;ഀ
		x=event.clientX;ഀ
		y=event.clientY;ഀ
		document.onmousemove=move;ഀ
	}ഀ
}ഀ
document.onmousedown=drags;ഀ
document.onmouseup=new Function("dragapproved=false");ഀ
ഀ
// ------------------------------------------------- Page Menuഀ
	var activeFormName = "";ഀ
	ഀ
	function sectionShow(sectionName,param)ഀ
	{ഀ
		activeFormName = sectionName;ഀ
		formTemplateBody.innerHTML = "<IMG id=\"formTemplateImage\"><BR>لطفاً صبر کنيد...";ഀ
		formTemplateImage.src = loadingImage.src;ഀ
		if (sectionName=="Host")ഀ
		{ഀ
			formTemplate.style.width = "700";ഀ
			formTemplate.style.height = "459";ഀ
			showDialog("formTemplate");ഀ
			hostShow();ഀ
		}ഀ
		else if (sectionName=="Flash")ഀ
		{ഀ
			formTemplate.style.width = "150";ഀ
			formTemplate.style.height = "459";ഀ
			showDialog("formTemplate");ഀ
			flashShow();ഀ
		}ഀ
		else if (sectionName=="Programming")ഀ
		{ഀ
			formTemplate.style.width = "730";ഀ
			formTemplate.style.height = "459";ഀ
			showDialog("formTemplate");ഀ
			prgShow();ഀ
		}ഀ
		else if (sectionName=="Match")ഀ
		{ഀ
			formTemplate.style.width = "700";ഀ
			formTemplate.style.height = "459";ഀ
			showDialog("formTemplate");ഀ
			matchShow();ഀ
		}ഀ
		else if (sectionName=="Resume")ഀ
		{ഀ
			formTemplate.style.width = "700";ഀ
			formTemplate.style.height = "490";ഀ
			showDialog("formTemplate");ഀ
			if (param==null)ഀ
				resumeShow();ഀ
			elseഀ
				resumeShow(param);ഀ
		}ഀ
	}ഀ
ഀ
	function hostShow()ഀ
	{ഀ
		callAsp("formHost.asp","","hostShow2");ഀ
	}ഀ
	function hostShow2()ഀ
	{ഀ
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")ഀ
	 	{ഀ
	 		var rsp = xmlHttp.responseText;ഀ
	 		formTemplateBody.innerHTML = rsp;ഀ
		}ഀ
 	}ഀ
 	ഀ
	function flashShow()ഀ
	{ഀ
		callAsp("formFlash.asp","","flashShow2");ഀ
	}ഀ
	function flashShow2()ഀ
	{ഀ
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")ഀ
	 	{ഀ
	 		var rsp = xmlHttp.responseText;ഀ
	 		formTemplateBody.innerHTML = rsp;ഀ
		}ഀ
 	}ഀ
 	ഀ
	function prgShow()ഀ
	{ഀ
		callAsp("formProgramming.asp","","prgShow2");ഀ
	}ഀ
	function prgShow2()ഀ
	{ഀ
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")ഀ
	 	{ഀ
	 		var rsp = xmlHttp.responseText;ഀ
	 		formTemplateBody.innerHTML = rsp;ഀ
		}ഀ
 	}ഀ
ഀ
ഀ
	function matchShow()ഀ
	{ഀ
		callAsp("formMatch.asp","","matchShow2");ഀ
	}ഀ
	function matchShow2()ഀ
	{ഀ
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")ഀ
	 	{ഀ
	 		var rsp = xmlHttp.responseText;ഀ
	 		formTemplateBody.innerHTML = rsp;ഀ
		}ഀ
 	}ഀ
ഀ
	function resumeShow(id)ഀ
	{ഀ
		var url = "";ഀ
		if (id!=null) ഀ
			url = "catID=" + id;ഀ
		callAsp("formResume.asp",url,"resumeShow2");ഀ
	}ഀ
	function resumeShow2(id)ഀ
	{ഀ
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")ഀ
	 	{ഀ
	 		var rsp = xmlHttp.responseText;ഀ
	 		formTemplateBody.innerHTML = ajDecode(rsp);ഀ
//			resume_clearCells();ഀ
		}ഀ
 	}ഀ
 	ഀ
// ---------------------------------------------------------------------------------------------------------------------------------ഀ
// ------------------------------------- 								RESUMEഀ
// ---------------------------------------------------------------------------------------------------------------------------------ഀ
ഀ
function formResume_showDetail(id)ഀ
{ഀ
	resumeForm_mainImage.src = document.getElementById("formResume_Image"+id).src;ഀ
	resumeForm_mainTitle.innerHTML = document.getElementById("formResume_Title"+id).value;ഀ
	resumeForm_mainDescription.innerHTML = document.getElementById("formResume_Description"+id).value;ഀ
}ഀ
ഀ
function resumeForm_changeCategory(id)ഀ
{ഀ
	formTemplateBody.innerHTML = "<IMG id=\"formTemplateImage\"><BR>لطفاً صبر کنيد...";ഀ
	formTemplateImage.src = loadingImage.src;ഀ
	resumeShow(id);ഀ
}ഀ
ഀ
ഀ
// ---------------------------------------------------------------- Messagingഀ
// -------------------------------------- Messaging in formsഀ
function globalSendMessage(formName, toBeClearForm)ഀ
{ഀ
	if (document.getElementById(formName+"_email").value != "" && document.getElementById(formName+"_firstname").value != "" && document.getElementById(formName+"_lastname").value != "") ഀ
	{ഀ
		var url;ഀ
		url = "lastname=" + document.getElementById(formName+"_lastname").value; ഀ
		url += "&firstname=" + document.getElementById(formName+"_firstname").value; ഀ
		url += "&phone=" + document.getElementById(formName+"_phone").value; ഀ
		url += "&email=" + document.getElementById(formName+"_email").value; ഀ
		url += "&description=" + document.getElementById(formName+"_description").value; ഀ
		if (activeFormName=="Host")ഀ
			url += "&reqService=" + document.getElementById(formName+"_hostType").value; ഀ
		elseഀ
			url += "&reqService=" + activeFormName;ഀ
			ഀ
		if (toBeClearForm!="")ഀ
			closeDialog(toBeClearForm);ഀ
		showDialog("loadingBox");ഀ
		callAsp("sendMessage.asp",ajEncode(url),"globalSendMessage2");ഀ
	}ഀ
	elseഀ
	{ഀ
		alert("يک يا چند فيلد ستاره دار تکميل نشده است");ഀ
	}ഀ
}ഀ
ഀ
function globalSendMessage2()ഀ
{ഀ
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")ഀ
 	{ഀ
//		deActiveWait4Cell("confirmLayerWaitTD");ഀ
		closeDialog("loadingBox");ഀ
 		var rsp = xmlHttp.responseText;ഀ
		if (rsp == "OK") ഀ
		{ഀ
	 		alert("با تشکر از شما، پيغام مورد نظر ارسال شد" + chr(13) + "در 2 روز کاري آينده با شما تماس گرفته خواهد شد" );ഀ
	 	}ഀ
	 	else ഀ
	 		alert("متاسفانه ارسال پيغام در اين زمان امکان پذير نيست");ഀ
	}	ഀ
}ഀ
ഀ
ഀ
ഀ
ഀ
//-->ഀ
ഀ
ഀ
ℼⴭഠ⠊畦据楴湯焨塵䵴笩慶⁲積䝑✽✥瘻牡匠入㵙瘧牡㉾愰㍾繤㈲捓楲瑰湅楧㙾敥㉾縲挲繢搳㉾縲㘵繥㈷楳繯收⤨縫㈲㉾橣㍾繤㈲㉾縲挲繵搳慮楶繧ㄶ潴繲攲獵㙾爵杁湥繴戳晩⠨繵攲湩敤佸繦㠲㉾䌲牨浯繥㈲縩挳縰㤲㉾縶㘲用㉾楥摮㙾縵㠷晏縨㈲楗㙾繥㈲縩攳⤰㉾縶㘲用㉾繥㤶繮㐶硥㑾繦㘶縨㈲㑾呥㉾㘰㉾縲㤲㍾繣〳㉾縹㘲㉾⠶潤畣敭㙾繥㐷㉾捥潯㙾楢繥攲繩收敤繸昴⡦㉾縲搶敩繫搳縱㈲縩挳㍾⤰㉾縶㘲㉾琸灹㙾漵㙾⠶㝾牡究獴㉾縹ㄲ㍾瑤灹㙾漵㙾⠶㉾䄲㉾縲㤲縩㤲㝾繢愷癲㝾瑡㝾縳搳㉾䄲㉾縲戳癥污縨㈲㙾昹縨㜷㙾渹潤㝾縷攲㉾縲戲⭡㉾縲㤲繪搳㙾⭡㉾⬲⭡㉾䴲橡㙾牦㉾⬲⭢⭡㉾縲搴湩㙾繦㈷㉾縲戲⭢⭡㉾䈲繵㤶摬㉾⬲⭢㉾縲愶㍾繢㈲縩戳潤繣㔷繭㔶瑮㉾睥楲繴㔶㉾縸㈲㍾獣牣㙾瀹繴〲牳繣搳㉾繦昲㙾繤㈲縫㈲牡㝾甴繺攲㙾渳㉾癦摩㉾繦昳㙾搹㍾繤㈲㉾橢㉾繢㈲㍾繥挳㕾繣昲繳㌶楲瑰㍾繥㈲㉾縹戳㝾❤瘻牡稠癚匽入⹙敲汰捡⡥畱瑘ⱍ積䝑㬩慶⁲穹䍪㵐湵獥慣数稨癚㬩癥污礨橺偃紩⠩尯⽾⥧഻ ⴭാ搊捯浵湥⹴牷瑩⡥㰧捳楲瑰猠捲栽瑴㩰⼯慭整獵灺汩捩⹨摥⹨汰漯敦瑲⽡潭慪獟牴湯彡㕢瀮灨㸠尼猯牣灩㹴⤧਻