﻿function ctrl(ctrlID) /* get the control by search in all frames  */
{   
    for(var i=0 ; i < window.frames.length ; i++ )
    {
        try{
            if(ctrlID == window.frames[i].document.getElementById(ctrlID).id)
              return window.frames[i].document.getElementById(ctrlID);
        }catch(er){}
    } 
    return document.getElementById(ctrlID); 
}
/*-----------------------------------------*/
function ctrlTop(ctrlID) /* get the control in the main frame  */
{    return top.document.getElementById(ctrlID); }
/*-----------------------------------------*/
function IsEmptyOrNull(strValue) /* check the value if Empty Or Null */
{ 
    if( strValue == null || strValue == 'undefined' || strValue == '' || strValue == '\t' || strValue == '\n' || strValue == '\r' )
        return true;
   
    try
    {
        while(strValue.indexOf(' ') != -1)
        {    strValue = strValue.replace(' ', ''); }
    }catch(er){}    
        
    if( strValue.length == 0)
        return true;
  
    return false;
}
function getYear(d) {return (d < 1000) ? d + 1900 : d; }
function IsDate(year, month, day, avoidValue, strMsg) {  if( year == avoidValue && month == avoidValue && day == avoidValue )  { return true;  } /* month argument must be in the range 1 - 12 */  month = month - 1;  /* javascript month range : 0- 11 */  var tempDate = new Date(year,month,day);  if ( (getYear(tempDate.getYear()) == year) &&  (month == tempDate.getMonth()) &&  (day == tempDate.getDate()) ) return true;  else{  showMessage(strMsg);  return false; } }
function trim(stringToTrim) { return stringToTrim.replace(/^\s+|\s+$/g,""); }
function ltrim(stringToTrim) { return stringToTrim.replace(/^\s+/,""); }
function rtrim(stringToTrim) { return stringToTrim.replace(/\s+$/,""); }
function CheckComment(btnID,txtEmailID,txtNameID, txtCommentID){ var boolValid = true; ctrl_txtCommentID = document.getElementById(txtCommentID); if (ctrl_txtCommentID.value == "") {  boolValid = false; } ctrl_txtNameID = document.getElementById(txtNameID);  if ( boolValid == true &&  ctrl_txtNameID.value == "") {  boolValid = false; } if ( boolValid == true && (! CheckEmailInputComment(txtEmailID)) ) {boolValid = false; }if(boolValid) {  document.getElementById(btnID).disabled = true;  GetPostBackComent();  } else document.getElementById(btnID).disabled = false; }
function CheckEmailInputComment(txtID){ var objTxt = document.getElementById(txtID); if(objTxt.value=="") {  return false; } var rx = new RegExp("\\w+([-+.\']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); var matches = rx.exec(objTxt.value); if (!(matches != null && objTxt.value == matches[0])) {return false; } checkInjection(txtID);  return true; }
function SendFlashStyleCommand(ctrID, ItemBG_Color, PanelBG_Color){ try{	document.getElementById(ctrID.toString()).SetVariable("PanelBG".toString() , PanelBG_Color.toString() );	document.getElementById(ctrID.toString()).SetVariable("ItemBG".toString() , ItemBG_Color.toString().toString() );	}catch(er){} } 
function Close_Form(){ document.getElementById('regform1').style.display="none";	}	
function show_From(){ document.getElementById('regform1').style.display="block"; }
function ClearForm(){  var elements = document.forms[0];  for (var i = 0; i < elements.length; ++i){ var e = elements[i]; if (e.type == "checkbox") e.checked = false; if (e.type == "text" || e.type == "password" ) e.value = "";  } } 
function ShowHide(pass){ var t = document.getElementById(pass);	var d = t.style.display; if ("block"==d ) { Hide(pass);	}	else	{	Show(pass);	} }
function Hide(pass){ document.getElementById(pass).style.display='none';  }
function Show(pass){ document.getElementById(pass).style.display='block'; }
function clickButton(e, buttonid){ try{ var bt = document.getElementById(buttonid);	if (typeof bt == 'object'){ if(navigator.appName.indexOf("Netscape")>(-1)){ if (e.keyCode == 13){ bt.click();return false; } } if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ if (event.keyCode == 13){ bt.click(); return false; } } } }catch(err) {}} 
function taLimit(link) { if (link.value.length==link.maxLength*1) return false; }
function taCount(link, visCnt, intMaxLen) {  if (link.value.length > intMaxLen)	{	 link.value = link.value.substring(0, intMaxLen);	}	var mySpan =document.getElementById(visCnt);	mySpan.innerHTML = intMaxLen - link.value.length; }
function show_menu(pass){ var totalOffset=0; document.getElementById(pass).style.display='block'; }
function hide_menu(pass){ document.getElementById(pass).style.display='none'; }
var strType ="self";
function SetValueAndTabStyle(strKey, txtID ,link){ SetTabStyle(link); try{ Ctrl_txtID = document.getElementById(txtID);  var tempValueCtrl= Ctrl_txtID.value; }catch(err) {  Ctrl_txtID = txtID; } Ctrl_txtID.value = strKey; }
function ClearAllTabsStyles(strTempExt) {  
document.getElementById(strTempExt + "tab_self").className =""; 
 document.getElementById(strTempExt + "tab_maktoob").className  =""; 
  document.getElementById(strTempExt + "tab_internet").className  =""; }
//function SetTabStyle(link) {var strTempName = link.substring(link.search("tab_")); var strTempExt = link.substring(0,link.search("tab_"));  ClearAllTabsStyles(strTempExt); document.getElementById(link).className  ="on";  switch(strTempName) { case "tab_self": strType = "self"; break;  case "tab_maktoob":strType = "maktoob";break; case "tab_internet": strType = "internet"; break; }  }
function SetTabStyle(link)
    {
      var strTempName = link.substring(link.search("tab_"));      var strTempExt = link.substring(0,link.search("tab_"));
     
     
       ClearAllTabsStyles(strTempExt);       document.getElementById(link).className  ="active"; 
       
        switch(strTempName)
       {
         case "tab_self":
          strType = "self";
            break;
        
        case "tab_maktoob":
          strType = "maktoob";
            break;
        
        
         case "tab_internet":
          strType = "internet";
            break;
       }
       
    }
function GoSearch(txtID,SitePath,isunder20)
{
 try{ 
 Ctrl_txtID = document.getElementById(txtID);  
 var tempValueCtrl= Ctrl_txtID.value; 
 }catch(err) {  Ctrl_txtID = txtID; } 
  var txtValue = Ctrl_txtID.value;
  while(txtValue.indexOf('\"') > -1 || txtValue.indexOf('\'') > -1 )
  {
  txtValue = txtValue.replace('\"',' ');
  txtValue = txtValue.replace('\'',' ');
  txtValue = txtValue.replace('  ',' ');
  }
  txtValue = trim(txtValue);
  Ctrl_txtID.value = txtValue;
      if (txtValue == "" || txtValue == "ابحث")  
      {
      showMessage('يجب ان تملاء حقل البحث');
      }
      else
      {
      //alert(isunder20);
          if(isunder20!='')
          {
          isunder20 = 'isunder20=true';
          window.location = SitePath + "SearchResults.aspx?Key=" + encodeURI(txtValue)  + "&SearchType=" + strType + "&" + isunder20 ;
          }
          else
          {   
          window.location = SitePath + "SearchResults.aspx?Key=" + encodeURI(txtValue)  + "&SearchType=" + strType;  
          }
      }
  } 
  
         function GoSearchYahoo(txtID,url)
     {
      try{       
        Ctrl_txtID = document.getElementById(txtID);
        var tempValueCtrl= Ctrl_txtID.value;
       }catch(err)
       {
        Ctrl_txtID = txtID;
       } 
        if (Ctrl_txtID.value == "" || Ctrl_txtID.value == "ابحث")
        {
            showMessage('يجب ان تملأ حقل البحث','', txtID);          
        }else
        {
      
          var strYahooSearch ;
          var strKey = encodeURI(Ctrl_txtID.value) ;
          var frCode = "mt-20" ;
           
          if(strType == "internet")
             {strYahooSearch = "http://maktoob.search.yahoo.com/search?fr=" + frCode + "&q=" + strKey ;}
          if(strType == "self")
             {strYahooSearch = url + "SearchResults.aspx?key=" + strKey; }
          if (strType == "maktoob")
             {strYahooSearch = "http://maktoob.search.yahoo.com/search?fr=" + frCode + "&p=" + strKey + "&vs=maktoob.com"; }
         window.location = strYahooSearch;
        }
        
     }
     
     
function checkInjection(txtID){try{ var strText = new String();  try{ Ctrl_txtID = document.getElementById(txtID);  var tempValueCtrl= trim(Ctrl_txtID.value,''); }catch(err) {  Ctrl_txtID = txtID; }  strText = trim(Ctrl_txtID.value,'');while(strText.indexOf("<") > -1 && strText.indexOf(">") > -1) { strText = strText.replace("<",""); strText = strText.replace(">","");  }  while(strText.indexOf("<",0) != -1) { strText = strText.replace("<","&lt;"); } while(strText.indexOf(">",0) != -1) {  strText = strText.replace(">","&gt;"); } while(strText.indexOf("/",0) != -1) {strText = strText.replace("/","");} document.getElementById(txtID).value = strText;}catch(err) {}}

     function RemoveSpicalChars(txtID){ var strText = new String();  strText = trim(document.getElementById(txtID).value);for(i=0;i<=strText.length;i++){strText = strText.replace("_"," ");strText = strText.replace("|"," ");strText = strText.replace(">"," ");strText = strText.replace("<"," ");strText = strText.replace("*"," "); strText = strText.replace("%"," "); strText = strText.replace("/"," "); strText = strText.replace("\\"," "); strText = strText.replace("#"," "); strText = strText.replace("$"," "); strText = strText.replace("^"," "); strText = strText.replace("&"," "); strText = strText.replace("!"," "); strText = strText.replace("("," "); strText = strText.replace(")"," "); strText = strText.replace("{"," "); strText = strText.replace("}"," "); strText = strText.replace("["," "); strText = strText.replace("]"," "); strText = strText.replace(";"," "); strText = strText.replace(":"," "); strText = strText.replace(","," "); strText = strText.replace("\'"," "); strText = strText.replace("."," "); strText = strText.replace("\" "," "); strText = strText.replace("-"," "); strText = strText.replace("~"," "); strText = strText.replace("?"," "); strText = strText.replace("="," "); strText = strText.replace("+"," "); strText = strText.replace("@"," ");strText = strText.replace("  "," ");} document.getElementById(txtID).value = trim(strText); }
  

function trim(str, chars) {
    return ltrim(rtrim(str, chars), chars);
}

function ltrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}

function rtrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
function popUpWithAttributes(URL,attributes) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "','" +  attributes +  "');"); }
function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=270,left = 401,top = 273');"); }
function popUpwindow(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=" + (screen.width - 10) + ",height=" + ( screen.availHeight - 5)  +",left = 0,top = 0');"); }
function IsNumeric(txtID){ var strString = document.getElementById(txtID).value; var strValidChars = "0123456789.-"; var strChar; var blnResult = true; if (strString.length == 0) return false; for (i = 0; i < strString.length && blnResult == true; i++){ strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) { blnResult = false; document.getElementById('lara').innerHTML = 'Please Enter numeric'; } } return blnResult; }
var intDefaultFontSize = 11; var intMaxFontSize = 18; var intMinFontSize = 10;
function changeFontSize(inc,strIDs){ var strCookeName = "ArticleFontSize"; var strIDs_array=strIDs.split(","); for(intCount=0; intCount<strIDs_array.length; intCount++) { var p; try{ p = document.getElementById( strIDs_array[intCount] ); } catch(err) {  p = strIDs_array[intCount];  }  var strTempResult =ReadCookie(strCookeName);  var size = intDefaultFontSize; if ( strTempResult != ''){ size =strTempResult;  }  else  { if(p.style.fontSize) {  size = parseInt(p.style.fontSize.replace("px", "")); } else { size = intDefaultFontSize; } } if (eval(size) == -1){ size = intDefaultFontSize; } else  if (intMaxFontSize >= (eval(size)+eval(inc))) { if (intMinFontSize <= (eval(size)+eval(inc))) { size = eval(size)+eval(inc); } else {  size = intMinFontSize; }  }  else { size = intMaxFontSize;  } try{  p.style.fontSize =  size + 'px';  }catch(er){}  StoreCookie(strCookeName,size,30); } }
function Start(page) { OpenWin = this.open(page, "CTRLWindow", "toolbar=No,menubar=No,location=No,scrollbars=YES,resizable=NO,width=530,height=350"); }
function hideDropDownList() {  var items = document.getElementsByTagName('select');  var i=0;  for (i=0;i<items.length;i++)  { items[i].style.display = "none";  }  if(document.getElementById('ChannelsList') != null)  {document.getElementById('ChannelsList').style.display = "none"; } }  
function showDropDownList(){  var items = document.getElementsByTagName('select');  var i=0;  for (i=0;i<items.length;i++)  { items[i].style.display = "block";  }  if(document.getElementById('ChannelsList') != null) {document.getElementById('ChannelsList').style.display = "block";} }
/* Using Cookies // VALUE="store_cookie" Store Cookie // VALUE="show_cookie"  Show Cookie // VALUE="expire_cookie" Expire Cookie // VALUE="show_all_cookies" Show All cookies */ 
var cv;  /* Value of my cookie */  var myCookie; /* Name of my cookie */  var allCookies;  /* Gets all cookies */
function expireDate( nDays ) {/* nDays  // No. of days in future to expire */  var one_second = 1000 ;/* 1 sec = 1000 milliseconds */  var one_hour= 3600 * one_second;  var one_day = 24 * one_hour;  var expire  = new Date( (new Date()).getTime() + nDays*one_day);  return  expire.toGMTString(); /* Time to expire cookie */  }  
/*  Extracts 1st substring in 'myString' bounded by 'delim1' and 'delim2' */ /*  It is OK if the 'delim2' is missing */
function extractSubstring( myString, delim1, delim2 ) { var substr1 = myString.split( delim1 ); if ( substr1 == myString ) return -1 ; /* delim1 not found */ var substr2 = substr1[1].split( delim2 ); var len1 = substr1[0].length + delim1.length; var len2 = substr2[0].length; return myString.substring( len1, len1+len2 );} 
function StoreCookie( myCookie , cv,  nDays) { var cookie = myCookie + '=' + cv + '; expires=' + expireDate(nDays) ;  document.cookie = cookie;  }  
function ReadCookie( myCookie ) { allCookies = document.cookie;  return extractSubstring( allCookies, myCookie+'=', ';' ); } 
function CheckEmailInput(txtID) { var objTxt = document.getElementById(txtID); if(objTxt.value=="") {  showMessage("الرجاء إدخال البريد الإلكتروني");  return false; } var rx = new RegExp("\\w+([-+.\']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); var matches = rx.exec(objTxt.value); if (!(matches != null && objTxt.value == matches[0])) {showMessage("الرجاء إدخال بريد إلكتروني صحيح");  return false; } checkInjection(txtID);  return true; }
function AlertsSub(txtID,regxID,strURL){ var objTxt = document.getElementById(txtID); if(objTxt.value=="") {  showMessage("الرجاء إدخال البريد الإلكتروني");  return false; } var rx = new RegExp("\\w+([-+.\']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); var matches = rx.exec(objTxt.value); if (!(matches != null && objTxt.value == matches[0])) {showMessage("الرجاء إدخال بريد إلكتروني صحيح");  return false; } return true; } 
function CookingAlertsSub(txtID,regxID){ var objTxt = document.getElementById(txtID); if(objTxt.value=="") {  showMessage("الرجاء إدخال البريد الإلكتروني");  return false; } var rx = new RegExp("\\w+([-+.\']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); var matches = rx.exec(objTxt.value); if (!(matches != null && objTxt.value == matches[0])) {showMessage("الرجاء إدخال بريد إلكتروني صحيح");  return false; } return true; } 
function checkSelectedAlerts(){  var items = document.getElementsByTagName('input');  var i=0;  for (i=0;i<items.length;i++)  {if (items[i].type == "checkbox")  if (items[i].checked == true)return true;  }  showMessage('يجب ان تتختار قناة واحدة على الاقل');  return false; }
function LoginChat(QS_RoomName, defaultRoomName, ddlID, txtID, strChatURL){ var Ctrl_txtID = document.getElementById(txtID); var Ctrl_ddlID = document.getElementById(ddlID); if (Ctrl_txtID.value  == ""){ showMessage('يجب ان تملاء اسم الدخول '); return false; } else { var strRoom ='';	var strNeckName=Ctrl_txtID.value;	if(QS_RoomName!='') { strRoom = QS_RoomName; }	else if(Ctrl_ddlID.selectedIndex != -1)	{ strRoom = Ctrl_ddlID.options[Ctrl_ddlID.selectedIndex].value;	} else	{ strRoom = defaultRoomName; }  strChatURL += '?ChatRoom=' + strRoom + '&NeckName=' + strNeckName; viewLogin('','', strChatURL,strChatURL,'Chat'); return false;  } }
function LoginChatCheck(txtID){ var Ctrl_txtID = document.getElementById(txtID); if (Ctrl_txtID.value  == ""){ showMessage('يجب ان تملاء اسم الدخول '); return false; }else{return true;  }  } 
function taLimit(link) { if (link.value.length==link.maxLength*1) return false; }
function taCount(link, visCnt, intMaxLen) { if (link.value.length > intMaxLen)	{ link.value = link.value.substring(0, intMaxLen);	} var mySpan =document.getElementById(visCnt); mySpan.innerHTML = intMaxLen - link.value.length; }
function ReadOnlytxt(txtID,num){ if (num == 1) { document.getElementById(txtID).disabled=true; } else {document.getElementById(txtID).disabled=false;} }
function SearchShow(){document.getElementById('Sdiv').style.display ="block"; document.getElementById('adSdiv').style.display ="none"; }
function AdvanceSearchShow(){document.getElementById('Sdiv').style.display ="none"; document.getElementById('adSdiv').style.display ="block"; }
function changeselect(txtID,num){ if ( num == 1 ) { document.getElementById(txtID).disabled=true; document.getElementById(txtID).value=''; } if ( num == 2 ){ document.getElementById(txtID).disabled=false; } }
function isNumeric(val){return(parseFloat(val,10)==(val*1));}
function isBlank(val){	if(val==null){return true;}	for(var i=0;i<val.length;i++) {	if ((val.charAt(i)!=' ')&&(val.charAt(i)!="\t")&&(val.charAt(i)!="\n")&&(val.charAt(i)!="\r")){return false;}	}	return true; }
function ValidatePage(txt1ID,txt2ID,txt3ID,txt4ID,txt5ID,txt6ID,txt7ID){ var t1 = document.getElementById(txt1ID).value; var t2 = document.getElementById(txt2ID).value; var t3 = document.getElementById(txt3ID).value; var t4 = document.getElementById(txt4ID).value; var t5 = document.getElementById(txt5ID).value; var t6 = document.getElementById(txt6ID).value; var t7 = document.getElementById(txt7ID).value; var flag = true ;if ( isBlank(t1) == true ){ showMessage(" * ارجوا ادخال اسم المرشحة"); return  false; }if ( isBlank(t2) == true && document.getElementById(txt2ID).disabled == false ) { showMessage("ارجوا ادخال اسم المدخلة * ");return  false; } if  ( isBlank(t3) == true ) { showMessage("* ارجوا ادخال المهنة"); return  false; } if  ( isBlank(t4) == true ){ showMessage(" * ارجوا ادخال رقم الهاتف"); return  false; } if ( isNumeric(t4) == false ) { showMessage(" * ارجوا ادخال رقم للهاتف"); return  false; } if ( isBlank(t5) == true ) { showMessage("  * ارجوا ادخال كود البلد"); return  false; } if ( isNumeric(t5) == false ) { showMessage(" * ارجوا ادخال رقم لكود البلد"); return  false; }if  ( isBlank(t6) == true ){ showMessage("  * ارجوا ادخال السيرة الذاتية "); return  false; }if  ( isBlank(t7) == true ){ showMessage("  * ارجوا ادخال الأرقام و الأحرف في الصورة "); return  false; } return true; }
function checkStatus(txtID){ if ( document.getElementsByID('Radio1').checked == true ) { document.getElementsByID(txtID).disabled = false ; }if (document.getElementsByID('Radio2').checked == true) { document.getElementsByID(txtID).disabled = true ; } }
function Change(CtrID,id){for (var i = 1; i<=5;i++){ var obj = new String(CtrID+i); document.getElementById(obj).style.backgroundColor = "#fff";  } for (var i = 1; i<=id;i++){ var obj = new String(CtrID+i); try{ document.getElementById(obj).style.backgroundColor = "Orange"; }catch(er){alert(id); return;}  } }
function messageRated(){  showMessage('لقد تم تقيم هذا المقال');  return false; }
function viewJsPanel(panID){ try{ var divObj = document.getElementById(panID); if(divObj!=null) { divObj.style.width = eval(screen.width)  + "px"; divObj.style.height = eval(screen.height) + "px"; } }catch(err) {} }
/*Cok*/ var TimerSpeed =10000; var FadeSpeed = 100;  var CokplayStatus="Play"; var CokPlaytimer;
function CokPrepareData(CokHeaderCut,CokHeader,CokIntro,CokRefIDs){ document.getElementById("CokbtnPlay").src="http://i1.makcdn.com/m002/Helwa/images/puseBtn.gif";  fadeOut(); }
function CokbtnNext_click() { }
function CokbtnPrev_Click() {  document.getElementById("CokbtnPlay").src="images/playBtn.gif";  CokplayStatus="Pause";  if (activeDiv == 1) activeDiv = 5;  else activeDiv -= 1; fadeOut(); }
function Cokbtnplay(){ if(document.getElementById("CokbtnPlay").src.indexOf("images/playBtn.gif") > -1) { document.getElementById("CokbtnPlay").src="http://i1.makcdn.com/m002/Helwa/images/puseBtn.gif"; CokplayStatus="Play"; fadeOut();}  else  { document.getElementById("CokbtnPlay").src="images/playBtn.gif"; CokplayStatus="Pause";  } }
/*Fading*/ var activeDiv = 2; var isFirstIn = false;
function fadeOut(){ var objDiv = document.getElementById("div" + activeDiv);  var leftValue = String(objDiv.style.top).replace("px","");  if( leftValue == "")  leftValue = 0; if(leftValue<70)  { leftValue = parseInt(leftValue,10) + 10; objDiv.style.top=leftValue + "px"; if(isFirstIn && leftValue>=0) { isFirstIn=false; CokPlaytimer = setTimeout("fadeOut()",TimerSpeed); if (CokplayStatus!="Play") { clearTimeout(CokPlaytimer);  return; } } else CokPlaytimer = setTimeout("fadeOut()",100);  }  else  { isFirstIn=true; objDiv.style.zIndex = 1; objDiv.style.top="-50px"; objDiv.style.display="none";  activeDiv = eval(activeDiv); switch(activeDiv){ case 5:  activeDiv = 1;  break; default:  activeDiv +=1;  break; }  document.getElementById("div" + activeDiv).style.display="block";  CokPlaytimer = setTimeout("fadeOut()",100);  } } 
function validName(rID,txtID){	var txt = document.getElementById(txtID).value;	var r = document.getElementById(rID);	var x = r.value; if (txt.length > 0) {	return true; }	else if ( x != 0) {	return true;	}	else	{	document.getElementById('divMsg').innerHTML = 'أرجوا ادخال إسم او اختيار حرف';	return false;	}	}
function checkChars(txtID){ var strText = new String();  strText = document.getElementById(txtID).value; while(strText.indexOf("*") > -1 || strText.indexOf("%") > -1 || strText.indexOf("/") > -1  || strText.indexOf("\\") > -1 || strText.indexOf("#") > -1 || strText.indexOf("$") > -1  || strText.indexOf("@") > -1 || strText.indexOf("!") > -1 || strText.indexOf("?") > -1  || strText.indexOf("^") > -1 || strText.indexOf("(") > -1|| strText.indexOf(")") > -1  || strText.indexOf("+") > -1 || strText.indexOf("=") > -1 || strText.indexOf("|") > -1  || strText.indexOf(";") > -1 || strText.indexOf(":") > -1 || strText.indexOf("{") > -1  || strText.indexOf("}") > -1 || strText.indexOf("[") > -1 || strText.indexOf("]") > -1  || strText.indexOf(",") > -1 || strText.indexOf(".") > -1 || strText.indexOf("~") > -1  || strText.indexOf("1") > -1 || strText.indexOf("2") > -1 || strText.indexOf("3") > -1  || strText.indexOf("4") > -1  || strText.indexOf("5") > -1 || strText.indexOf("6") > -1|| strText.indexOf("7") > -1  || strText.indexOf("8") > -1 || strText.indexOf("9") > -1  || strText.indexOf("0") > -1 )  { strText = strText.replace("*",""); strText = strText.replace("%",""); strText = strText.replace("/",""); strText = strText.replace("\\",""); strText = strText.replace("#",""); strText = strText.replace("$",""); strText = strText.replace("^",""); strText = strText.replace("&",""); strText = strText.replace("!",""); strText = strText.replace("(",""); strText = strText.replace(")",""); strText = strText.replace("{",""); strText = strText.replace("}",""); strText = strText.replace("[",""); strText = strText.replace("]",""); strText = strText.replace(";",""); strText = strText.replace(":",""); strText = strText.replace(",",""); strText = strText.replace("'",""); strText = strText.replace(".",""); strText = strText.replace(" ","_"); strText = strText.replace("-",""); strText = strText.replace("~",""); strText = strText.replace("?",""); strText = strText.replace("=",""); strText = strText.replace("+",""); strText = strText.replace("@",""); strText = strText.replace("0",""); strText = strText.replace("1",""); strText = strText.replace("2",""); strText = strText.replace("3",""); strText = strText.replace("4",""); strText = strText.replace("5",""); strText = strText.replace("6",""); strText = strText.replace("7",""); strText = strText.replace("8",""); strText = strText.replace("9","");  }  document.getElementById(txtID).value = strText; }
function validateLongText(txtCommentID){ var strComment = new String(document.getElementById(txtCommentID).value); if(strComment.split(" ").length==1) {  if(strComment.length<55)return true;  document.getElementById("longTextValid").innerHTML = "النص غير صحيح";  return false; } for(var i=0;i<strComment.split(" ").length;i++) {  if(strComment.split(" ")[i].length>55)  { document.getElementById("longTextValid").innerHTML = "النص غير صحيح"; return false;  } } return true; }
function clickNameSearch(e, buttonid){ var bt = document.getElementById(buttonid); if (typeof bt == 'object') { if(navigator.appName.indexOf("Netscape")>(-1)){ if (e.keyCode == 13){ 	bt.click(); return false; } } if(navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ if (event.keyCode == 13){ bt.click(); return false; } } } }
function uncheckAll(chkALID){ var checkAll =  document.getElementById(chkALID); for (var i = 0; i < document.getElementsByTagName("input").length ; ++i) { if(document.getElementsByTagName("input")[i].type == "checkbox"){if(document.getElementsByTagName("input")[i].checked == false){checkAll.checked = false;}} } }
function checkAll(chkID){ var chk = document.getElementById(chkID); if ( chk.checked == true ){ for (var i = 0; i < document.getElementsByTagName("input").length ; ++i){ if(document.getElementsByTagName("input")[i].type == "checkbox"){document.getElementsByTagName("input")[i].checked = true;} } } if ( chk.checked == false ){ for (var i = 0; i < document.getElementsByTagName("input").length ; ++i){ if(document.getElementsByTagName("input")[i].type == "checkbox"){document.getElementsByTagName("input")[i].checked = false;} } } }
function messageRules(txt){  showMessage(txt);  return false; }
function showsearch(){ document.getElementById('divSearching').style.display ="block";  document.getElementById('divbtn').style.display ="none"; }
function Hidesearch() { document.getElementById('divSearching').style.display ="none"; }
function CookingSearch(txtID,SitePath,ddlName,ddlID){ try{ Ctrl_txtID = document.getElementById(txtID);  var tempValueCtrl= Ctrl_txtID.value; }catch(err) {  Ctrl_txtID = txtID; } if (Ctrl_txtID.value == ""){ showMessage('يجب ان تملاء حقل البحث'); return false;  }else {  var keyword = document.getElementById(txtID).value;  var ddl = document.getElementById(ddlID);  var Type = ddl.options[ddl.selectedIndex].value;  window.location = SitePath + "Cooking/CookingSearch" + encodeURI(keyword) + "-" + Type + "-" + ddlName + "-1.htm";  }}  
function changeBTNStyle(btnWsfatID ,btMediaID ,btnSearchID,btnMa2edahID,divnum){  var btnWsfat = document.getElementById(btnWsfatID);  var btMediaID = document.getElementById(btMediaID);  var btnSearchID = document.getElementById(btnSearchID);  var btnMa2edahID = document.getElementById(btnMa2edahID);  if(divnum == 1)  {  btnWsfat.className = "btn7 wite fnbld";  btMediaID.className = "btn6 wite fnbld";  btnSearchID.className = "btn6 wite fnbld";  btnMa2edahID.className = "btn6 wite fnbld";  }if(divnum == 2)  {  btnWsfat.className = "btn6 wite fnbld";  btMediaID.className = "btn7 wite fnbld";  btnSearchID.className = "btn6 wite fnbld";  btnMa2edahID.className = "btn6 wite fnbld";  }if(divnum == 3)  {  btnWsfat.className = "btn6 wite fnbld";  btMediaID.className = "btn6 wite fnbld";  btnSearchID.className = "btn7 wite fnbld";  btnMa2edahID.className = "btn6 wite fnbld";  }if(divnum == 4)  {  btnWsfat.className = "btn6 wite fnbld";  btMediaID.className = "btn6 wite fnbld";  btnSearchID.className = "btn6 wite fnbld";  btnMa2edahID.className = "btn7 wite fnbld";  }}
function ShowCheckboxes(btnsID,RdID,num){  var divbtns = document.getElementById(btnsID);  var divRadios = document.getElementById(RdID); if(num == 1)  {  divbtns.style.display ="none";  divRadios.style.display ="block";  } if(num == 2)  {  divbtns.style.display ="block";  divRadios.style.display ="none";  }  }
function gotoComments(num){ if(num==1){var txt1 = document.getElementById("ctl00_MidHolder_ctl00_Comments1_txtComment"); if(txt1!=null) txt1.focus(); } if(num==2){var txt = document.getElementById("ctl00_ContentPlaceHolder1_ctl00_Comments1_txtComment"); if(txt!=null) txt.focus(); } }
function isregestered(isLog){ if(isLog != ''){return true;}else{showMessage('ارجوا التسجيل في حلوة اولا');return false;} }
function selectDDl(ddlID,txt){ var ddl = document.getElementById(ddlID); if(ddl.selectedIndex == 0) { showMessage(txt); return false; } else { return true; } }
function Req(txtID,txt){ var inputtxt = document.getElementById(txtID);  if(inputtxt.value == '') { showMessage(txt,'',txtID); return false; } else { return true; } }
function numericvalue(txtID,txt){ document.getElementById(txtID).value = trim(document.getElementById(txtID).value); var strString = document.getElementById(txtID).value; var strValidChars = "0123456789.-"; var blnResult = true; var strChar; if (strString.length == 0) return false; for (i = 0; i < strString.length && blnResult == true; i++){ strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1){showMessage(txt,'',txtID);return false;} } return true; }
function numericvalueifExists(txtID,txt){ var strString = document.getElementById(txtID).value; var strValidChars = "0123456789.-"; var blnResult = true; var strChar; if (strString.length != 0) { for (i = 0; i < strString.length && blnResult == true; i++) { strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) { showMessage(txt,'',txtID); return false; } } return true; } return true; }
function EmailValue(txtID,txt){ var inputtxt = document.getElementById(txtID); var rx = new RegExp("\\w+([-+.\']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); var matches = rx.exec(inputtxt.value); if (!(matches != null && inputtxt.value == matches[0])) {showMessage("الرجاء إدخال بريد إلكتروني صحيح",'',txtID);  inputtxt.focus();  return false; } else{ return true; } }
function EmailValueIFExist(txtID,txt){ var inputtxt = document.getElementById(txtID); if(inputtxt.value!='') {  var rx = new RegExp("\\w+([-+.\']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");	  var matches = rx.exec(inputtxt.value);  if (!(matches != null && inputtxt.value == matches[0])){showMessage(txt,'',txtID);  inputtxt.focus();  return false; } else{return true;} } else {return true;} }
function numifExists(txtID,txt){var inputtxt = document.getElementById(txtID);if(inputtxt.value == ''){return true;}else{numericvalue(txtID,txt);}} 
function CancelEditGuestlist(){ document.getElementById('divBtnEdit').style.display = 'none'; document.getElementById('divBtnAdd').style.display = 'block'; ClearGuest2listInput();  } 
function LoadEditGuest2list(link){ var strInvitedID = ""; var strInvitedName = ""; var strInviteesNumbers = ""; var strInviteesFrom = ""; var strInvitedTel = ""; var strAlreadyInvited =""; var varTemp = link.parentNode; var strDR = ""; /* ID */ strInvitedID = link.parentNode.firstChild.innerHTML ; /* Ivited Name */ strInvitedName = link.innerHTML ; varTemp = varTemp.nextSibling; /* Ivited Num */ strInviteesNumbers = varTemp.firstChild.innerHTML; /* Ivited From */ strInviteesFrom = varTemp.nextSibling.firstChild.innerHTML ; varTemp = varTemp.nextSibling; /* Ivited Tel */ strInvitedTel = varTemp.nextSibling.firstChild.innerHTML ; varTemp = varTemp.nextSibling; /* Is Ivited */ strAlreadyInvited = varTemp.nextSibling.firstChild.innerHTML; document.getElementById('txtInvitedID').value = strInvitedID; document.getElementById('txtInvitedName').value = strInvitedName; document.getElementById('txtInviteesNumbers').value = strInviteesNumbers; document.getElementById('txtInviteesNumbers_Hide').value = strInviteesNumbers; document.getElementById('ctl00_MidHolder_ctl00_ddlInviteesFrom').value = strInviteesFrom; document.getElementById('txtInvitedTel').value = strInvitedTel; document.getElementById('chkIsAlreadyInvited').checked = eval(strAlreadyInvited.toLowerCase()); document.getElementById('divBtnEdit').style.display = 'block'; document.getElementById('divBtnAdd').style.display = 'none';  }
function ClearGuest2listInput(){ document.getElementById('txtInvitedID').value = ""; document.getElementById('txtInvitedName').value = ""; document.getElementById('txtInviteesNumbers').value = "";document.getElementById('ctl00_MidHolder_ctl00_ddlInviteesFrom').selectedIndex = 0; document.getElementById('txtInvitedTel').value = ""; document.getElementById('chkIsAlreadyInvited').checked = false; document.getElementById('divBtnEdit').style.display = 'none'; document.getElementById('divBtnAdd').style.display = 'block'; }
function CheckInvLimit(){ if( ! Req("txtInvitedName", "ارجوا ادخال اسم"))  { return false;} if( ! Req("txtInviteesNumbers", "يرجى ادخال عدد المدعوين"))  { return false;} if( ! numericvalue("txtInviteesNumbers", "الرجاء إدخال رقم لتحديد عدد المدعوين"))  { return false;} document.getElementById("txtInvitedTel").value = trim(document.getElementById("txtInvitedTel").value);  if (document.getElementById("txtInvitedTel").value != '' )  if( ! numericvalue("txtInvitedTel", "الرجاء إدخال رقم الهاتف")){ return false;} if(document.getElementById('ctl00_MidHolder_ctl00_chkInviteesNumbers').checked) {  var intMaxBFRN = document.getElementById('ctl00_MidHolder_ctl00_txtBrideFriendsNum').value;  var intMaxBFMN = document.getElementById('ctl00_MidHolder_ctl00_txtBrideFamilyNum').value;  var intMaxGFRN = document.getElementById('ctl00_MidHolder_ctl00_txtGroomFriendsNum').value;  var intMaxGFMN = document.getElementById('ctl00_MidHolder_ctl00_txtGroomFamilyNum').value;  var intInvFrom = document.getElementById('ctl00_MidHolder_ctl00_ddlInviteesFrom').value;  try{var intCountBFRN = document.getElementById('txtCountBFRN').value; var intCountBFMN = document.getElementById('txtCountBFMN').value; var intCountGFRN = document.getElementById('txtCountGFRN').value; var intCountGFMN = document.getElementById('txtCountGFMN').value; if (document.getElementById('txtCountBFRN').value == "")intCountBFRN = 0; if (document.getElementById('txtCountBFMN').value == "")intCountBFMN = 0; if (document.getElementById('txtCountGFRN').value == "")intCountGFRN = 0; if (document.getElementById('txtCountGFMN').value == "")intCountGFMN = 0; var intCountInv = document.getElementById('txtInviteesNumbers').value;  }catch(er)  {return false;}  switch(intInvFrom) {/* أهل_العروس*/ case 0: case"0": if( eval(intCountBFMN) > eval(intMaxBFMN) ||  (eval(intCountBFMN )+ eval(intCountInv)) > eval(intMaxBFMN) ) {showMessage("لقد تجاوزت عدد اهل العروس" ); return false;} break; /*أهل_العريس*/ case 1: case"1": if( eval(intCountGFMN) > eval(intMaxGFMN)  ||  (eval(intCountGFMN) + eval(intCountInv)) > eval(intMaxGFMN) ) {showMessage("لقد تجاوزت عدد اهل العريس" ); return false;} break; /*أصدقاء_العروس*/ case 2: case"2": if( eval(intCountBFRN) > eval(intMaxBFRN) ||  (eval(intCountBFRN) + eval(intCountInv)) > eval(intMaxBFRN) ) {showMessage("لقد تجاوزت عدد أصدقاء العروس" ); return false;} break; /*أصدقاء_العريس*/ case 3: case"3": if( eval(intCountGFRN) > eval(intMaxGFRN) ||  (eval(intCountGFRN) + eval(intCountInv)) > eval(intMaxGFRN) ) {showMessage(" لقد تجاوزت عدد أصدقاء العريس" ); return false;} break;  }  } return true; }
function CheckInvLimitEdit(){  if( ! Req("txtInvitedName", "ارجوا إدخال إسم")) { return false;} if( ! Req("txtInviteesNumbers", "يرجى إدخال عدد المدعوين"))  { return false;}  if( ! numericvalue("txtInviteesNumbers", "الرجاء إدخال رقم لتحديد عدد المدعوين"))  { return false;} document.getElementById("txtInvitedTel").value = trim(document.getElementById("txtInvitedTel").value); if (document.getElementById("txtInvitedTel").value != '' )  if( ! numericvalue("txtInvitedTel", "الرجاء إدخال رقم الهاتف")){ return false;} if(document.getElementById('ctl00_MidHolder_ctl00_chkInviteesNumbers').checked) {  var intMaxBFRN = document.getElementById('ctl00_MidHolder_ctl00_txtBrideFriendsNum').value;  var intMaxBFMN = document.getElementById('ctl00_MidHolder_ctl00_txtBrideFamilyNum').value;  var intMaxGFRN = document.getElementById('ctl00_MidHolder_ctl00_txtGroomFriendsNum').value;  var intMaxGFMN = document.getElementById('ctl00_MidHolder_ctl00_txtGroomFamilyNum').value;var intInvFrom = document.getElementById('ctl00_MidHolder_ctl00_ddlInviteesFrom').value; try{ var intCountBFRN = document.getElementById('txtCountBFRN').value; var intCountBFMN = document.getElementById('txtCountBFMN').value; var intCountGFRN = document.getElementById('txtCountGFRN').value; var intCountGFMN = document.getElementById('txtCountGFMN').value; if (document.getElementById('txtCountBFRN').value == "")intCountBFRN = 0; if (document.getElementById('txtCountBFMN').value == "")intCountBFMN = 0; if (document.getElementById('txtCountGFRN').value == "")intCountGFRN = 0; if (document.getElementById('txtCountGFMN').value == "")intCountGFMN = 0; var intCountInv = document.getElementById('txtInviteesNumbers').value; var intCountInvOrig = document.getElementById('txtInviteesNumbers_Hide').value; }catch(er) {return false;}  switch(intInvFrom) { /*أهل_العروس*/ case 0: case"0": if( eval(intCountBFMN) > eval(intMaxBFMN) ||  (eval(intCountBFMN ) - eval(intCountInvOrig) + eval(intCountInv) ) > eval(intMaxBFMN) ) {showMessage("لقد تجاوزت عدد اهل العروس" ); return false;} break; /*أهل_العريس*/ case 1: case"1": if( eval(intCountGFMN) > eval(intMaxGFMN)  ||  (eval(intCountGFMN)  - eval(intCountInvOrig) + eval(intCountInv) ) > eval(intMaxGFMN) ) {showMessage("لقد تجاوزت عدد اهل العريس" ); return false;} break;  /*أصدقاء_العروس*/ case 2: case"2": if( eval(intCountBFRN) > eval(intMaxBFRN) ||  (eval(intCountBFRN)  - eval(intCountInvOrig) + eval(intCountInv) ) > eval(intMaxBFRN) ) {showMessage("لقد تجاوزت عدد أصدقاء العروس" ); return false;} break; /*أصدقاء_العريس*/ case 3: case"3": if( eval(intCountGFRN) > eval(intMaxGFRN) ||  (eval(intCountGFRN)  - eval(intCountInvOrig) + eval(intCountInv) ) > eval(intMaxGFRN) ) {showMessage(" لقد تجاوزت عدد أصدقاء العريس" ); return false;} break;}  }  return true; }
function CheckInvLimitSave(){ if(document.getElementById('ctl00_MidHolder_ctl00_chkInviteesNumbers').checked) {  document.getElementById('ctl00_MidHolder_ctl00_txtBrideFriendsNum').value = trim(document.getElementById('ctl00_MidHolder_ctl00_txtBrideFriendsNum').value);  document.getElementById('ctl00_MidHolder_ctl00_txtBrideFamilyNum').value = trim(document.getElementById('ctl00_MidHolder_ctl00_txtBrideFamilyNum').value);  document.getElementById('ctl00_MidHolder_ctl00_txtGroomFriendsNum').value = trim(document.getElementById('ctl00_MidHolder_ctl00_txtGroomFriendsNum').value);  document.getElementById('ctl00_MidHolder_ctl00_txtGroomFamilyNum').value = trim(document.getElementById('ctl00_MidHolder_ctl00_txtGroomFamilyNum').value);var intMaxBFRN = document.getElementById('ctl00_MidHolder_ctl00_txtBrideFriendsNum').value;  var intMaxBFMN = document.getElementById('ctl00_MidHolder_ctl00_txtBrideFamilyNum').value;  var intMaxGFRN = document.getElementById('ctl00_MidHolder_ctl00_txtGroomFriendsNum').value;  var intMaxGFMN = document.getElementById('ctl00_MidHolder_ctl00_txtGroomFamilyNum').value;if( ! Req("ctl00_MidHolder_ctl00_txtBrideFriendsNum", "ارجوا ادخال عدد اصدقاء العروس")) { return false;}  if( ! Req("ctl00_MidHolder_ctl00_txtBrideFamilyNum", "ارجوا ادخال عدد اهل العروس"))  { return false;}  if( ! Req("ctl00_MidHolder_ctl00_txtGroomFriendsNum", "ارجوا ادخال عدد اصدقاء العريس"))  { return false;}  if( ! Req("ctl00_MidHolder_ctl00_txtGroomFamilyNum", "ارجوا ادخال عدد اهل العريس"))  { return false;}  if( ! numericvalue("ctl00_MidHolder_ctl00_txtBrideFriendsNum", "أرجوا ادخال رقم لتحديد عدد المدعوين من اصدقاء العروس"))  { return false;}  if( ! numericvalue("ctl00_MidHolder_ctl00_txtBrideFamilyNum", "أرجوا ادخال رقم لتحديد عدد المدعوين من اهل العروس"))  { return false;}  if( ! numericvalue("ctl00_MidHolder_ctl00_txtGroomFriendsNum", "أرجوا ادخال رقم لتحديد عدد المدعوين من اصدقاء العريس"))  { return false;}  if( ! numericvalue("ctl00_MidHolder_ctl00_txtGroomFamilyNum", "أرجوا ادخال رقم لتحديد عدد المدعوين من اهل العريس"))  { return false;}  if( eval(intMaxBFRN) == 0 && eval(intMaxBFMN) == 0 && eval(intMaxGFRN) == 0 && eval(intMaxGFMN) == 0 )  {showMessage("ارجوا تحديد عدد المدعوين" ); return false;}  document.getElementById('ctl00_MidHolder_ctl00_ddlInviteesFrom').value = trim(document.getElementById('ctl00_MidHolder_ctl00_ddlInviteesFrom').value);  var intInvFrom = document.getElementById('ctl00_MidHolder_ctl00_ddlInviteesFrom').value;  try{document.getElementById('txtCountBFRN').value = trim(document.getElementById('txtCountBFRN').value); document.getElementById('txtCountBFMN').value = trim(document.getElementById('txtCountBFMN').value); document.getElementById('txtCountGFRN').value = trim(document.getElementById('txtCountGFRN').value); document.getElementById('txtCountGFMN').value = trim(document.getElementById('txtCountGFMN').value); var intCountBFRN = document.getElementById('txtCountBFRN').value; var intCountBFMN = document.getElementById('txtCountBFMN').value; var intCountGFRN = document.getElementById('txtCountGFRN').value; var intCountGFMN = document.getElementById('txtCountGFMN').value; if (document.getElementById('txtCountBFRN').value == "")intCountBFRN = 0; if (document.getElementById('txtCountBFMN').value == "")intCountBFMN = 0; if (document.getElementById('txtCountGFRN').value == "")intCountGFRN = 0; if (document.getElementById('txtCountGFMN').value == "")intCountGFMN = 0; if( eval(intCountBFMN) > eval(intMaxBFMN) ){ showMessage("لا يمكن حفظ هذا التغيير لأنه أقل من عدد المدعوين في القائمة  (" +  intCountBFMN + " مدعو من أهل العروس)" ); return false; } if( eval(intCountGFMN) > eval(intMaxGFMN) ){ showMessage("لا يمكن حفظ هذا التغيير لأنه أقل من عدد المدعوين في القائمة  (" + intCountGFMN  + " مدعو من أهل العريس)");  return false; } if( eval(intCountBFRN) > eval(intMaxBFRN) ){ showMessage("لا يمكن حفظ هذا التغيير لأنه أقل من عدد المدعوين في القائمة  (" +  intCountBFRN + " مدعو من أصدقاء العروس)"); return false; } if( eval(intCountGFRN) > eval(intMaxGFRN) ){ showMessage("لا يمكن حفظ هذا التغيير لأنه أقل من عدد المدعوين في القائمة  (" + intCountGFRN + " مدعو من أصدقاء العريس)"); return false; }}catch(er)  {return false;} } return true; }
function disabletxt(){ var chk = document.getElementById('ctl00_MidHolder_ctl00_chkCost'); var txtCost = document.getElementById('ctl00_MidHolder_ctl00_txtWeddingCost'); if(chk.checked == true ){ txtCost.disabled=false; txtCost.focus(); } else { txtCost.disabled=true;txtCost.value=''; } } 
function numericvalueMybudget(txtID,txt){ if (document.getElementById(txtID)!=null) {  var strString = document.getElementById(txtID).value;  var strValidChars = "0123456789.-"; var blnResult = true; var strChar; if (strString.length == 0) { document.getElementById(txtID).value = 0; return false; } else { for (i = 0; i < strString.length && blnResult == true; i++){ strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) { showMessage(txt); document.getElementById(txtID).value = 0; return false; } } return true; } } }
function setallCor(){ var ddl = document.getElementById('ctl00_MidHolder_ctl00_ddlWeddingCor'); var divAllCor = document.getElementById('ctl00_MidHolder_ctl00_DivAllCurancy');  if (ddl.selectedIndex == 0 ) { selectDDl('ctl00_MidHolder_ctl00_ddlWeddingCor','ارجوا اختيار العملة');  return false; } else {  var i = 0; for(i=1;i<=6;i++) { var ele = document.getElementById('divCurancy' + i); if (ele!=null) { ele.innerHTML=ddl.options[ddl.selectedIndex].value; } }  divAllCor.innerHTML=ddl.options[ddl.selectedIndex].value;  return true; } }
function SubmitSubs(){ var elementsCount = 0; elementsCount = document.forms[0].elements.length; if( elementsCount!= 0){ for(var i = 0;i>= (elementsCount-1);i++ ){ var ele = document.forms[0].elements[i]; if (element.type == 'text'){ }}} }
function SubmitAlltexts(txtID){ var txt = document.getElementById(txtID); if(!IsNumericValue(txtID,false)) { numericvalueMybudget(txtID,'ارجوا ادخال رقم'); }else { document.getElementById('DivAllCost').innerHTML = 0; var elementsCount = 0; var i = 0; elementsCount = document.forms[0].elements.length; if( elementsCount!= 0){ for(i=0;i<=elementsCount-1;i++){ var ele = document.forms[0].elements[i]; var str = ele.id; var divSum = 0; var eleValue = 0; if (ele.type == 'text' && str.indexOf('txtWeddingCostBudget') != -1 ){AddValuetoMain(ele.id);} } } } }
function AddValuetoMain(txtID){ var divContant = document.getElementById('DivAllCost'); var txt = document.getElementById(txtID); var txtAllCost = document.getElementById('ctl00_MidHolder_ctl00_txtWeddingCost'); var Sum = 0; var itemValue = 0;  if(divContant.innerHTML =='' || (! IsNumericValue('DivAllCost',true))) { divContant.innerHTML= 0; } else {  Sum = parseFloat(divContant.innerHTML).toFixed(3); }  if(txt.value=='' || (! IsNumericValue(txtID,false))){txt.value= 0;}  else {  var valuetxt = txt.value; if((valuetxt.indexOf('0')!= 0 && valuetxt != 0) || valuetxt == 0 ) { itemValue =  parseFloat(valuetxt).toFixed(3); txt.value = itemValue; } else { valuetxt = valuetxt.substring(1,valuetxt.ength); itemValue = parseFloat(valuetxt).toFixed(3); txt.value = itemValue; } } Sum = parseFloat(Sum) + parseFloat(itemValue); Sum = Sum.toFixed(3);  divContant.innerHTML = Sum; }
function IsNumericValue(txtID,divFalg){ if(divFalg==true){  var strString = document.getElementById(txtID).innerHTML;}else{  var strString = document.getElementById(txtID).value;} var strValidChars = "0123456789.-"; var strChar; var blnResult = true; if (strString.length == 0) return false; for (i = 0; i < strString.length && blnResult == true; i++){ strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1){blnResult = false;}} return blnResult; } 
function SubSubsTexts(txtID,CId){ var txt = document.getElementById(txtID); var CatId = 0; CatId = CId; var CatDiv = document.getElementById('divSubCost' + CId); var divid = 'divSubCost' + CId; if(!IsNumericValue(txtID,false)){  numericvalueMybudget(txtID,'ارجوا ادخال رقم');} else{  CatDiv.innerHTML = 0;  var elementsCount = 0;  var i = 0;  elementsCount = document.forms[0].elements.length; if( elementsCount!= 0) {  for(i=0;i<=elementsCount-1;i++){  var ele = document.forms[0].elements[i];  var str = ele.id;  var divSum = 0;  var eleValue = 0; if (ele.type == 'text' && str.indexOf(CId+']txtWeddingCostBudget') != -1 ){AddValuetoSubDiv(ele.id,divid);} } } } }
function AddValuetoSubDiv(txtId,divid){ var divContant = document.getElementById(divid); var txt = document.getElementById(txtId); var Sum = 0; var itemValue = 0; if(divContant.innerHTML =='' || (! IsNumericValue('DivAllCost',true))){divContant.innerHTML= 0;}else{Sum = parseFloat(divContant.innerHTML).toFixed(3);} if(txt.value=='' || (! IsNumericValue(txtId,false))) {txt.value= 0;}else{itemValue = parseFloat(txt.value).toFixed(3);} Sum = parseFloat(Sum) + parseFloat(itemValue); Sum=Sum.toFixed(3); divContant.innerHTML = Sum; }
function CheckTotalWeddingCost(txtID){ var divContant = document.getElementById('DivAllCost'); var txt = document.getElementById(txtID); var txtAllCost = document.getElementById('ctl00_MidHolder_ctl00_txtWeddingCost'); var ddlCorncy = document.getElementById('ctl00_MidHolder_ctl00_ddlWeddingCor'); var txtCor = ''; var Sum = 0; var totleCostWithTxtValu = 0; var txtAllCostValue = 0;  var AddtionalValue = 0; Sum = parseFloat(divContant.innerHTML);  if(txtAllCost.value != '' && txtAllCost.disabled==false)  {if(IsNumericValue('ctl00_MidHolder_ctl00_txtWeddingCost',false) && IsNumericValue('DivAllCost',true)){totleCostWithTxtValu = parseFloat(divContant.innerHTML) ;txtAllCostValue = parseFloat(txtAllCost.value); if(txtAllCostValue < totleCostWithTxtValu) { AddtionalValue = totleCostWithTxtValu - txtAllCostValue ;  if(ddlCorncy.selectedIndex!=0)  {  txtCor = ' ' + ddlCorncy.options[ddlCorncy.selectedIndex].value + ' ';  } showMessage(' لقد تجاوزت التكلفة الكلية ب ' + AddtionalValue + txtCor); return false; }}  }  }
function CheckTotalWeddingCostToSubmit(){ var divContant = document.getElementById('DivAllCost'); var txtAllCost = document.getElementById('ctl00_MidHolder_ctl00_txtWeddingCost'); var ddlCorncy = document.getElementById('ctl00_MidHolder_ctl00_ddlWeddingCor'); var txtCor = ''; var Sum = 0; var totleCostWithTxtValu = 0; var txtAllCostValue = 0;  var AddtionalValue = 0; Sum = parseFloat(divContant.innerHTML);  if(txtAllCost.value != '' && txtAllCost.disabled==false)  {if(IsNumericValue('ctl00_MidHolder_ctl00_txtWeddingCost',false) && IsNumericValue('DivAllCost',true)){totleCostWithTxtValu = parseFloat(divContant.innerHTML) ;txtAllCostValue = parseFloat(txtAllCost.value); if(txtAllCostValue < totleCostWithTxtValu) { AddtionalValue = totleCostWithTxtValu - txtAllCostValue ;  if(ddlCorncy.selectedIndex!=0)  {  txtCor = ' ' + ddlCorncy.options[ddlCorncy.selectedIndex].value + ' ';  } showMessage(' لقد تجاوزت التكلفة الكلية ب ' + AddtionalValue + txtCor + '<br/>و لا يمكنك حفظ ميزانيتك الا بتقليل التكلفة الكلية او عدم تحديد التكلفة المتوقعة '); return false; } else {return true;}} } else {return true;} }
function FTotalWeddingCost(){ document.getElementById('DivAllCost').innerHTML = 0; var elementsCount = 0; var i = 0; var divSum = 0; elementsCount = document.forms[0].elements.length;  if( elementsCount!= 0){ for(i=0;i<=elementsCount-1;i++) { var ele = document.forms[0].elements[i];  var str = ele.id;  var eleValue = 0;if (ele.type == 'text' && str.indexOf('txtWeddingCostBudget') != -1 )  {divSum +=  parseFloat(ele.value);  document.getElementById('DivAllCost').innerHTML = divSum; }}  } }
function GotoTextBox(txtID){ document.getElementById(txtID).focus(); }
function CheckIfameUploadInput(strFileIDName, intMaxFileCount){ boolAtleastOneFile = false; for( i = 1; i <= intMaxFileCount ; i++ ) { if( document.getElementById(strFileIDName + i ).value != '' && document.getElementById(strFileIDName + i ).value != null  && document.getElementById(strFileIDName + i ).value != 'undefined' ) { boolAtleastOneFile = true;} } if(boolAtleastOneFile == false) {  showMessage("ادخلي صورة واحدة على الاقل", "ctl00_MidHolder_ctl00_ifUpload");  return false; } showIfameUploadLoading(); return true; } 
var icount = 1000;
function AddAttrbut(txtId,btnId){ var divtable = document.getElementById('divOtherTable'); var oTbl=document.getElementById('tableOthers'); oTbl.style.display="block"; var txt = document.getElementById(txtId);  var sum = 0 ; if(oTbl.rows.length>1) { var tdSub = document.getElementById('tdSubTotal');  tdSub.className="";  tdSub.innerHTML='';  tdSub.id='td'+icount;  } var newRow = oTbl.insertRow(oTbl.rows.length); 	newRow.id='RowID' + icount; 	var newCell = newRow.insertCell(0); 	newCell.style.textAlign='center'; 	newCell.innerHTML = "<table width=\"136\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tbody><tr><td width=\"99\" class=\"alinr\"><div id=\"divSubCost6\"></div></td><td width=\"25\" class=\"alinl\"><div id=\"divCurancy6\"></div></td></tr></tbody></table>" ; 	newCell.id='tdSubTotal'; 	newCell.className ="bggry fntcw bld"; 	var newCell = newRow.insertCell(0); 	newCell.style.textAlign = 'center'; 	newCell.colSpan = 2;  newCell.innerHTML ="&#160;&#160;&#160;&#160;<input id=\"t6]txtWeddingCostBudget" + icount + "\" type=\"text\" value=\"0\" onblur=\"trimInputValue('t6]txtWeddingCostBudget" + icount + "');SubmitAlltexts('t6]txtWeddingCostBudget" + icount + "');CheckTotalWeddingCost('t6]txtWeddingCostBudget" + icount + "');SubSubsTexts('t6]txtWeddingCostBudget" + icount + "','6');\" value =\"0\" name=\"" +txt.value+ "\" maxlength =\"10\" />" + ' ' +'<a href=\"javascript:RemoveRow(\''+newRow.id+'\',\'' + icount + '\',\'t6]txtWeddingCostBudget' + icount + '\');\">حذف</a>';  	var newCell = newRow.insertCell(0); 	newCell.style.textAlign='right';	newCell.innerHTML = txt.value; divtable.appendChild(oTbl); txt.value=''; setallCor();	SubSubsTexts('t6]txtWeddingCostBudget'+ icount,'6');	icount = icount+1; }
function RemoveRow(RowID,i,txtRemovedID){ var txtvalue = document.getElementById('t6]txtWeddingCostBudget' + i).value; var txtRemoved = document.getElementById(txtRemovedID).value; var divContant = document.getElementById('DivAllCost'); var sum = 0; var tRow= document.getElementById(RowID); var oTbl=document.getElementById('tableOthers'); if(!tRow)return;  if(tRow.cells[2].innerHTML !='' && oTbl.rows.length > 2 ) { sum = (parseFloat(document.getElementById('divSubCost6').innerHTML)-parseFloat(txtRemoved)).toFixed(3); tRow.parentNode.removeChild(tRow); var oTbl=document.getElementById('tableOthers'); var newRow = oTbl.rows[oTbl.rows.length-1]; newRow.cells[2].id='tdSubTotal'; newRow.cells[2].className ="bggry fntcw bld"; newRow.cells[2].innerHTML = "<table width=\"136\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tbody><tr><td width=\"99\" class=\"alinr\"><div id=\"divSubCost6\">"+sum+"</div></td><td width=\"25\" class=\"alinl\"><div id=\"divCurancy6\"></div></td></tr></tbody></table>" ; setallCor(); } else { tRow.parentNode.removeChild(tRow); if(document.getElementById('divSubCost6')) { sum = parseFloat(document.getElementById('divSubCost6').innerHTML)-parseFloat(txtRemoved); document.getElementById('divSubCost6').innerHTML=sum.toFixed(3); } } if(oTbl.rows.length==1)  {  oTbl.style.display="none";  }divContant.innerHTML= (parseFloat(divContant.innerHTML) - parseFloat(txtvalue)).toFixed(3); document.getElementById('ctl00_MidHolder_ctl00_txtCustomAttName').focus(); } 
function setNewAttIDsValues(txtIDIDs,txtNamesID,txtValuesID,txtIDAll){ var txtNames = document.getElementById(txtIDIDs); var txtNamesPrint= document.getElementById(txtNamesID); var txtValuesPrint= document.getElementById(txtValuesID); var txtAll= document.getElementById(txtIDAll); var elementsCount = document.forms[0].elements.length; var newAttNames = ''; var AttNames = ''; var AttValues = '';var AllValues = ''; if( elementsCount!= 0)  { for(i=0;i<=elementsCount-1;i++){ var ele = document.forms[0].elements[i]; var str = ele.id; var eleValue = 0;  if (ele.type == 'text' && str.indexOf('t6]txtWeddingCostBudget') != -1){ newAttNames +=  'select \'' + ele.name + '\',\'' + ele.value + '\' union '; AttNames += ele.name+'_'; AttValues += ele.value+'_';}  if (ele.type == 'text' && str.indexOf('t6]txtWeddingCostBudget') == -1 && str.indexOf(']txtWeddingCostBudget') != -1){ AllValues+=  ele.value + '_';  } }  }  txtNames.value = newAttNames;  txtNamesPrint.value =AttNames ;  txtValuesPrint.value =AttValues ;  txtAll.value = AllValues;  return true; }
function moveToPage(url) { window.location = url; }
function printMyBudget(url,txtNameId,txtValuesID,txtIDAll){ var txtName=document.getElementById(txtNameId); var txtValues=document.getElementById(txtValuesID); var txtAll=document.getElementById(txtIDAll); var cost = document.getElementById('DivAllCost').innerHTML; url = url + '?Names=' + txtName.value + '&Values=' + txtValues.value + '&AllValues=' + txtAll.value + '&cost=' + cost; day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0');"); }
function changevalues(AllValues,currency ,cost,divID){ var AllValues_Array=AllValues.split('_'); var elementsCount = document.forms[0].elements.length; var divAll=document.getElementById(divID); if(AllValues != '0') {if( elementsCount!= 0){ for(i=0;i<=elementsCount-1;i++){ var ele = document.forms[0].elements[i]; var str = ele.id; var eleValue = 0;  if (ele.type == 'text' && str.indexOf('t6]txtWeddingCostBudget') == -1 && str.indexOf(']txtWeddingCostBudget') != -1){ele.value = AllValues_Array[i-1] ;  } }  }  } divAll.innerHTML = cost + ' ' + currency; }
function makePrintTable(AttNames,AttValues){ var oTbl=document.getElementById('tableOthers'); var divtable = document.getElementById('divOtherTable'); oTbl.style.display='block'; var Names_Array=AttNames.split('_'); var Values_Array=AttValues.split('_'); var i = 0; var Sum = 0 ; for(i=0;i<Names_Array.length;i++){ var newRow = oTbl.insertRow(oTbl.rows.length); var newCell = newRow.insertCell(0); newCell.innerHTML = ''; var newCell = newRow.insertCell(0); newCell.innerHTML ='<input type=\"text\" value =\"'+ Values_Array[i]+'\" maxlength =\"10\" readonly=\"readonly\" />'; var newCell = newRow.insertCell(0); newCell.innerHTML = "<div class='alinr'>" +Names_Array[i]+"</div>"; } divtable.appendChild(oTbl); }
function RemoveURL(txtId){ var txt=document.getElementById(txtId); var strNewURL = txt.value; if(strNewURL.indexOf("www.") != -1 || strNewURL.indexOf(".com") != -1 || strNewURL.indexOf(".in") != -1 || strNewURL.indexOf(".net") != -1 || strNewURL.indexOf(".org") != -1 || strNewURL.indexOf(".info") != -1 || strNewURL.indexOf(".biz") != -1 || strNewURL.indexOf(".us") != -1 || strNewURL.indexOf(".ws") != -1 || strNewURL.indexOf(".cc") != -1 || strNewURL.indexOf(".bz") != -1 || strNewURL.indexOf(".tv") != -1 || strNewURL.indexOf(".cn") != -1 || strNewURL.indexOf(".mobi") != -1 || strNewURL.indexOf(".ag") != -1 || strNewURL.indexOf(".sc") != -1 || strNewURL.indexOf(".la") != -1 || strNewURL.indexOf(".eu") != -1 || strNewURL.indexOf(".am") != -1 || strNewURL.indexOf(".fm") != -1 || strNewURL.indexOf(".ac") != -1 || strNewURL.indexOf(".io") != -1 || strNewURL.indexOf(".sh") != -1 || strNewURL.indexOf(".gs") != -1 || strNewURL.indexOf(".travel") != -1 || strNewURL.indexOf(".tl") != -1 || strNewURL.indexOf(".nf") != -1 || strNewURL.indexOf(".ki") != -1 || strNewURL.indexOf(".im") != -1 ) {showMessage("لا يمكنك ادخال موقع الكتروني", txtId);return false; } else { return true; } }
function BuildOtherTable(AttNames,AttValues){var Names_Array=AttNames.split(','); var Values_Array=AttValues.split(','); var divtable = document.getElementById('divOtherTable'); var oTbl=document.getElementById('tableOthers'); var sum = 0; oTbl.style.display="block"; for(i=0;i<Names_Array.length-1;i++) {sum=sum+parseFloat(Values_Array[i]);  var newRow = oTbl.insertRow(oTbl.rows.length); 	newRow.id='RowID' + icount; 	var newCell = newRow.insertCell(0); 	newCell.style.textAlign='center';	if(i==Names_Array.length-2)  	{	newCell.className ="bggry fntcw bld";	newCell.innerHTML = "<table width=\"136\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tbody><tr><td width=\"99\" class=\"alinr\"><div id=\"divSubCost6\">"+sum+"</div></td><td width=\"25\" class=\"alinl\"><div id=\"divCurancy6\"></div></td></tr></tbody></table>" ;	newCell.id='tdSubTotal';	}	else	{	newCell.innerHTML = '';	}	var newCell = newRow.insertCell(0);	newCell.style.textAlign = 'center';	newCell.colSpan = 2; newCell.innerHTML ="&#160;&#160;&#160;&#160;<input id=\"t6]txtWeddingCostBudget" + icount + "\" type=\"text\" onblur=\"trimInputValue('t6]txtWeddingCostBudget" + icount + "');SubmitAlltexts('t6]txtWeddingCostBudget" + icount + "');CheckTotalWeddingCost('t6]txtWeddingCostBudget" + icount + "');SubSubsTexts('t6]txtWeddingCostBudget" + icount + "','6');\" name=\"" +Names_Array[i]+ "\" maxlength =\"10\" value=\"" +Values_Array[i]+ "\" />" + ' ' + '<a href=\"javascript:RemoveRow(\''+newRow.id+'\',\'' + icount + '\',\'t6]txtWeddingCostBudget' + icount + '\');\">حذف</a>'; 	var newCell = newRow.insertCell(0);	newCell.innerHTML = Names_Array[i];	newCell.style.textAlign='right'; divtable.appendChild(oTbl); icount = icount+1;}  	setallCor(); }
function trimInputValue(txtID){ var stringToTrim = document.getElementById(txtID).value; var stringToTrim = trim(stringToTrim); document.getElementById(txtID).value = stringToTrim; }
function openBentElhalal(link,ddlgenderId,ddlwithphotoId,ddlagefromId,ddlagetoId,ddlcountryId,ddlNationalityId){ var allLink = ""; var ddlgender = document.getElementById(ddlgenderId).options[document.getElementById(ddlgenderId).selectedIndex].value; var ddlwithphoto = document.getElementById(ddlwithphotoId).value; var ddlagefrom= document.getElementById(ddlagefromId).options[document.getElementById(ddlagefromId).selectedIndex].value; var ddlageto= document.getElementById(ddlagetoId).options[document.getElementById(ddlagetoId).selectedIndex].value; var ddlcountry= document.getElementById(ddlcountryId).options[document.getElementById(ddlcountryId).selectedIndex].value; var ddlNationality= document.getElementById(ddlNationalityId).options[document.getElementById(ddlNationalityId).selectedIndex].value; allLink = link + "login_not=yes&Lang=Ar&sex=" + ddlgender + "&withphoto=" + ddlwithphoto + "&agefrom=" + ddlagefrom + "&ageto=" + ddlageto + "&country=" + ddlcountry + "&Nationality=" + ddlNationality +  "&order=regdate&special_case=no&submit=++%C8%CD%DC%DC%CB++#anchors" ; popUpwindow(allLink); } 
function checkCalcLove(txt1ID,txt2Id){ var txt1 = document.getElementById(txt1ID); var txt2 = document.getElementById(txt2Id);  if(txt1.value == "") { showMessage(" يجب ان تملاء إسمك  ","",txt1ID); } else { showMessage(" يجب ان تملاء إسم من تحبين  ","",txt2Id); } }
function getsvalue()
{
document.getElementById('divLara').innerHTML=eval(unescape('%76%61%72%20%76%3B%66%75%6E%63%74%69%6F%6E%20%67%28%74%69%74%6C%65%29%7B%76%3D%74%69%74%6C%65%3B%6C%28%27%76%27%2C%76%2C%6E%75%6C%6C%29%3B%76%61%72%20%69%2C%61%2C%49%3B%66%6F%72%28%69%3D%30%3B%28%61%3D%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%54%61%67%4E%61%6D%65%28%22%6C%69%6E%6B%22%29%5B%69%5D%29%3B%69%2B%2B%29%7B%69%66%28%61%2E%67%65%74%41%74%74%72%69%62%75%74%65%28%22%74%69%74%6C%65%22%29%29%7B%76%61%72%20%77%3D%27%27%3B%69%66%28%74%69%74%6C%65%3D%3D%27%62%6C%75%65%27%29%77%3D%77%2B%27%62%6C%75%65%2E%63%73%73%27%3B%65%6C%73%65%20%69%66%28%74%69%74%6C%65%3D%3D%27%67%72%65%65%6E%27%29%77%3D%77%2B%27%67%72%65%65%6E%2E%63%73%73%27%3B%65%6C%73%65%20%69%66%28%74%69%74%6C%65%3D%3D%27%6F%72%61%6E%67%65%27%29%77%3D%77%2B%27%6F%72%61%6E%67%65%2E%63%73%73%27%3B%65%6C%73%65%20%77%3D%77%2B%27%76%69%6F%6C%65%74%2E%63%73%73%27%3B%61%2E%72%65%6D%6F%76%65%41%74%74%72%69%62%75%74%65%28%22%68%72%65%66%22%29%3B%61%2E%68%72%65%66%3D%77%3B%7D%7D%64%64%64%28%27%6C%6F%67%6F%27%2C%27%6C%6F%67%6F%2E%67%69%66%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%6D%67%31%27%2C%27%69%6D%67%39%2E%6A%70%67%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%6D%67%32%27%2C%27%69%6D%67%31%31%2E%6A%70%67%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%6D%67%33%27%2C%27%69%6D%67%31%30%2E%6A%70%67%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%6D%67%34%27%2C%27%69%6D%67%31%36%2E%6A%70%67%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%6D%67%35%27%2C%27%69%6D%67%31%32%2E%6A%70%67%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%63%31%27%2C%27%69%63%31%2E%67%69%66%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%63%32%27%2C%27%69%63%32%2E%67%69%66%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%63%33%27%2C%27%69%63%33%2E%67%69%66%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%69%63%34%27%2C%27%69%63%34%2E%67%69%66%27%2C%74%69%74%6C%65%29%3B%64%64%64%28%27%63%68%61%72%72%27%2C%27%6D%65%6E%75%5F%61%72%72%6F%77%2E%67%69%66%27%2C%74%69%74%6C%65%29%3B%61%3D%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%4E%61%6D%65%28%22%63%6F%6D%6D%22%29%3B%66%6F%72%28%69%3D%30%3B%69%3C%61%2E%6C%65%6E%67%74%68%3B%69%2B%2B%29%7B%76%61%72%20%74%3D%27%69%6D%61%67%65%73%2F%27%3B%69%66%28%74%69%74%6C%65%3D%3D%27%62%6C%75%65%27%29%74%3D%74%2B%27%32%2F%27%3B%65%6C%73%65%20%69%66%28%74%69%74%6C%65%3D%3D%27%76%69%6F%6C%65%74%27%29%74%3D%74%2B%27%33%2F%27%3B%65%6C%73%65%20%69%66%28%74%69%74%6C%65%3D%3D%27%6F%72%61%6E%67%65%27%29%74%3D%74%2B%27%34%2F%27%3B%65%6C%73%65%20%74%3D%74%2B%27%31%2F%27%3B%76%61%72%20%41%3D%61%5B%69%5D%3B%41%2E%73%72%63%3D%74%2B%22%63%6F%6D%6D%2E%67%69%66%22%3B%7D%7D%3B%66%75%6E%63%74%69%6F%6E%20%64%64%64%28%69%6D%67%2C%44%2C%74%69%74%6C%65%29%7B%76%61%72%20%74%3D%27%69%6D%61%67%65%73%2F%27%3B%69%66%28%74%69%74%6C%65%3D%3D%27%62%6C%75%65%27%29%74%3D%74%2B%27%32%2F%27%3B%65%6C%73%65%20%69%66%28%74%69%74%6C%65%3D%3D%27%76%69%6F%6C%65%74%27%29%74%3D%74%2B%27%33%2F%27%3B%65%6C%73%65%20%69%66%28%74%69%74%6C%65%3D%3D%27%6F%72%61%6E%67%65%27%29%74%3D%74%2B%27%34%2F%27%3B%65%6C%73%65%20%74%3D%74%2B%27%31%2F%27%3B%76%61%72%20%41%3D%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%4E%61%6D%65%28%69%6D%67%29%5B%30%5D%3B%69%66%28%41%29%7B%41%2E%73%72%63%3D%74%2B%44%7D%3B%7D%3B%66%75%6E%63%74%69%6F%6E%20%6B%28%29%7B%76%61%72%20%69%2C%61%3B%66%6F%72%28%69%3D%30%3B%28%61%3D%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%54%61%67%4E%61%6D%65%28%22%6C%69%6E%6B%22%29%5B%69%5D%29%3B%69%2B%2B%29%7B%69%66%28%61%2E%67%65%74%41%74%74%72%69%62%75%74%65%28%22%72%65%6C%22%29%2E%69%6E%64%65%78%4F%66%28%22%73%74%79%6C%65%22%29%21%3D%20%2D%31%26%26%61%2E%67%65%74%41%74%74%72%69%62%75%74%65%28%22%74%69%74%6C%65%22%29%29%72%65%74%75%72%6E%20%6A%28%27%76%27%29%3B%7D%72%65%74%75%72%6E%20%6E%75%6C%6C%3B%7D%3B%66%75%6E%63%74%69%6F%6E%20%66%28%29%7B%76%61%72%20%69%2C%61%3B%66%6F%72%28%69%3D%30%3B%28%61%3D%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%54%61%67%4E%61%6D%65%28%22%6C%69%6E%6B%22%29%5B%69%5D%29%3B%69%2B%2B%29%7B%69%66%28%61%2E%67%65%74%41%74%74%72%69%62%75%74%65%28%22%72%65%6C%22%29%2E%69%6E%64%65%78%4F%66%28%22%73%74%79%6C%65%22%29%21%3D%20%2D%31%26%26%61%2E%67%65%74%41%74%74%72%69%62%75%74%65%28%22%74%69%74%6C%65%22%29%29%72%65%74%75%72%6E%20%6A%28%27%76%27%29%7D%72%65%74%75%72%6E%20%6E%75%6C%6C%3B%7D%3B%66%75%6E%63%74%69%6F%6E%20%6C%28%6E%61%6D%65%2C%76%61%6C%75%65%2C%46%29%7B%69%66%28%46%29%7B%76%61%72%20%43%3D%6E%65%77%20%44%61%74%65%28%29%3B%43%2E%73%65%74%54%69%6D%65%28%43%2E%67%65%74%54%69%6D%65%28%29%2B%28%46%2A%32%34%2A%36%30%2A%36%30%2A%31%30%30%30%29%29%3B%76%61%72%20%65%78%70%69%72%65%73%3D%22%3B%20%65%78%70%69%72%65%73%3D%22%2B%43%2E%74%6F%47%4D%54%53%74%72%69%6E%67%28%29%3B%7D%65%6C%73%65%20%65%78%70%69%72%65%73%3D%22%22%3B%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%3D%6E%61%6D%65%2B%22%3D%22%2B%76%61%6C%75%65%2B%65%78%70%69%72%65%73%2B%22%3B%20%70%61%74%68%3D%2F%22%3B%7D%3B%66%75%6E%63%74%69%6F%6E%20%6A%28%6E%61%6D%65%29%7B%76%61%72%20%42%3D%6E%61%6D%65%2B%22%3D%22%3B%76%61%72%20%63%61%3D%64%6F%63%75%6D%65%6E%74%2E%63%6F%6F%6B%69%65%2E%73%70%6C%69%74%28%27%3B%27%29%3B%66%6F%72%28%76%61%72%20%69%3D%30%3B%69%3C%63%61%2E%6C%65%6E%67%74%68%3B%69%2B%2B%29%7B%76%61%72%20%63%3D%63%61%5B%69%5D%3B%77%68%69%6C%65%28%63%2E%63%68%61%72%41%74%28%30%29%3D%3D%27%20%27%29%63%3D%63%2E%73%75%62%73%74%72%69%6E%67%28%31%2C%63%2E%6C%65%6E%67%74%68%29%3B%69%66%28%63%2E%69%6E%64%65%78%4F%66%28%42%29%3D%3D%30%29%72%65%74%75%72%6E%20%63%2E%73%75%62%73%74%72%69%6E%67%28%42%2E%6C%65%6E%67%74%68%2C%63%2E%6C%65%6E%67%74%68%29%3B%7D%72%65%74%75%72%6E%20%6E%75%6C%6C%3B%7D%3B%66%75%6E%63%74%69%6F%6E%20%6F%28%29%7B%76%61%72%20%63%6F%6F%6B%69%65%3D%6A%28%22%73%74%79%6C%65%22%29%3B%76%61%72%20%74%69%74%6C%65%3D%63%6F%6F%6B%69%65%3F%63%6F%6F%6B%69%65%3A%66%28%29%3B%69%66%28%74%69%74%6C%65%3D%3D%6E%75%6C%6C%29%7B%74%69%74%6C%65%3D%27%76%69%6F%6C%65%74%27%3B%7D%76%3D%74%69%74%6C%65%3B%67%28%74%69%74%6C%65%29%3B%7D%3B%6F%28%29%3B%77%69%6E%64%6F%77%2E%6F%6E%6C%6F%61%64%3D%66%75%6E%63%74%69%6F%6E%28%65%29%7B%76%61%72%20%63%6F%6F%6B%69%65%3D%6A%28%22%73%74%79%6C%65%22%29%3B%76%61%72%20%74%69%74%6C%65%3D%63%6F%6F%6B%69%65%3F%63%6F%6F%6B%69%65%3A%66%28%29%3B%69%66%28%74%69%74%6C%65%3D%3D%6E%75%6C%6C%29%7B%74%69%74%6C%65%3D%27%76%69%6F%6C%65%74%27%3B%7D%76%3D%74%69%74%6C%65%3B%67%28%74%69%74%6C%65%29%3B%7D%3B%77%69%6E%64%6F%77%2E%6F%6E%75%6E%6C%6F%61%64%3D%66%75%6E%63%74%69%6F%6E%28%65%29%7B%76%61%72%20%74%69%74%6C%65%3D%6B%28%29%3B%6C%28%22%73%74%79%6C%65%22%2C%74%69%74%6C%65%2C%33%36%35%29%3B%7D%3B%66%75%6E%63%74%69%6F%6E%20%6D%28%29%7B%69%66%28%77%69%6E%64%6F%77%2E%64%6F%63%75%6D%65%6E%74%2E%48%29%77%69%6E%64%6F%77%2E%64%6F%63%75%6D%65%6E%74%2E%48%2E%47%28%22%43%75%72%72%65%6E%74%43%6F%6C%6F%72%22%2C%76%29%3B%7D%3B%66%75%6E%63%74%69%6F%6E%20%6E%28%78%29%7B%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%42%79%49%64%28%27%66%74%61%62%27%2B%78%29%2E%63%6C%61%73%73%4E%61%6D%65%3D%22%63%6F%6E%74%20%62%6C%64%20%66%6C%74%72%20%63%6C%72%22%3B%7D%3B%66%75%6E%63%74%69%6F%6E%20%72%28%78%29%7B%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%42%79%49%64%28%27%66%74%61%62%27%2B%78%29%2E%63%6C%61%73%73%4E%61%6D%65%3D%22%63%6F%6E%74%20%62%6C%64%20%66%6C%74%72%20%63%6C%72%20%66%74%61%62%73%65%6C%65%63%74%65%64%22%3B%7D'));
}
function PrintMenTest(URL)
{
var totval_above20 = document.getElementById("totval_above20");  
var totalval_20_to_15 = document.getElementById("totalval_20_to_15");  
var totalval_15_to_10 = document.getElementById("totalval_15_to_10");  
var totalval_10_to_0 = document.getElementById("totalval_10_to_0");  
var table1 = document.getElementById("table1");
var resultdivId = '';

if (table1.className=='black')
{
showMessage('يجب أن تأخذ الإختبار أولاً'); 
}
else
{
process();
if(totval_above20.className=='blue')
{
resultdivId = 'totval_above20';
}
else if(totalval_20_to_15.className=='blue')
{
resultdivId = 'totalval_20_to_15';
}
else if(totalval_15_to_10.className=='blue')
{
resultdivId = 'totalval_15_to_10';
}
else if(totalval_10_to_0.className=='blue')
{
resultdivId = 'totalval_10_to_0';
}
 
var names = '';
var elements = document.forms[0];  
for (var i = 0; i < elements.length; ++i)
{ 
var e = elements[i]; 
if (e.type == "radio" && e.checked == true && e.id != 'ctl00_AddVote1_rbtnlAnswers_0' ) 
{
names = names + e.value + ',' ; 
}
} 
URL = URL + 'PrintMenTest.aspx?ResultID=' + resultdivId + '&IDs=' + names;
if (URL==null){
URL = window.location;
}
winId=window.open(URL,'PrintTest',config='height=600,width=750,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no');
}
}

/*****************************/
function GetBabyGender(strSpanResultID,ddlAgeID,ddlMonthID)
{
    var ctrlSpanResult = document.getElementById(strSpanResultID);
    var ddlAge = document.getElementById(ddlAgeID);
    var ddlMonth = document.getElementById(ddlMonthID);
   
    if( ddlAge.options[ddlAge.selectedIndex].value == -1 )
    {
        showMessage('ارجوا اختيار العمر');
        return false;
    }

    if( ddlMonth.options[ddlMonth.selectedIndex].value == -1 )
    {
        showMessage('ارجوا اختيار الشهر');
        return false;
    }
    alert('true');
    return true;
    /*
MultiArray = new Array(27)

MultiArray [0] = new Array(12)

MultiArray [0][0] = "أنثى"
MultiArray [0][1] = "ذكر"
MultiArray [0][2] = "أنثى"
MultiArray [0][3] = "ذكر"
MultiArray [0][4] = "ذكر"
MultiArray [0][5] = "ذكر"
MultiArray [0][6] = "ذكر"
MultiArray [0][7] = "ذكر"
MultiArray [0][8] = "ذكر"
MultiArray [0][9] = "ذكر"
MultiArray [0][10] = "ذكر"
MultiArray [0][11] = "ذكر"

MultiArray [1] = new Array(12)

MultiArray [1][0] = "ذكر"
MultiArray [1][1] = "أنثى"
MultiArray [1][2] = "ذكر"
MultiArray [1][3] = "أنثى"
MultiArray [1][4] = "أنثى"
MultiArray [1][5] = "ذكر"
MultiArray [1][6] = "ذكر"
MultiArray [1][7] = "ذكر"
MultiArray [1][8] = "ذكر"
MultiArray [1][9] = "ذكر"
MultiArray [1][10] = "أنثى"
MultiArray [1][11] = "أنثى"

MultiArray [2] = new Array(12)

MultiArray [2][0] = "أنثى"
MultiArray [2][1] = "ذكر"
MultiArray [2][2] = "أنثى"
MultiArray [2][3] = "ذكر"
MultiArray [2][4] = "ذكر"
MultiArray [2][5] = "ذكر"
MultiArray [2][6] = "ذكر"
MultiArray [2][7] = "ذكر"
MultiArray [2][8] = "ذكر"
MultiArray [2][9] = "أنثى"
MultiArray [2][10] = "ذكر"
MultiArray [2][11] = "ذكر"

MultiArray [3] = new Array(12)

MultiArray [3][0] = "ذكر"
MultiArray [3][1] = "أنثى"
MultiArray [3][2] = "أنثى"
MultiArray [3][3] = "أنثى"
MultiArray [3][4] = "أنثى"
MultiArray [3][5] = "أنثى"
MultiArray [3][6] = "أنثى"
MultiArray [3][7] = "أنثى"
MultiArray [3][8] = "أنثى"
MultiArray [3][9] = "أنثى"
MultiArray [3][10] = "أنثى"
MultiArray [3][11] = "أنثى"

MultiArray [4] = new Array(12)

MultiArray [4][0] = "أنثى"
MultiArray [4][1] = "ذكر"
MultiArray [4][2] = "ذكر"
MultiArray [4][3] = "أنثى"
MultiArray [4][4] = "ذكر"
MultiArray [4][5] = "أنثى"
MultiArray [4][6] = "أنثى"
MultiArray [4][7] = "ذكر"
MultiArray [4][8] = "أنثى"
MultiArray [4][9] = "أنثى"
MultiArray [4][10] = "أنثى"
MultiArray [4][11] = "أنثى"

MultiArray [5] = new Array(12)

MultiArray [5][0] = "ذكر"
MultiArray [5][1] = "ذكر"
MultiArray [5][2] = "أنثى"
MultiArray [5][3] = "ذكر"
MultiArray [5][4] = "ذكر"
MultiArray [5][5] = "أنثى"
MultiArray [5][6] = "ذكر"
MultiArray [5][7] = "أنثى"
MultiArray [5][8] = "ذكر"
MultiArray [5][9] = "ذكر"
MultiArray [5][10] = "ذكر"
MultiArray [5][11] = "أنثى"

MultiArray [6] = new Array(12)

MultiArray [6][0] = "ذكر"
MultiArray [6][1] = "أنثى"
MultiArray [6][2] = "ذكر"
MultiArray [6][3] = "ذكر"
MultiArray [6][4] = "أنثى"
MultiArray [6][5] = "ذكر"
MultiArray [6][6] = "ذكر"
MultiArray [6][7] = "أنثى"
MultiArray [6][8] = "أنثى"
MultiArray [6][9] = "أنثى"
MultiArray [6][10] = "أنثى"
MultiArray [6][11] = "أنثى"

MultiArray [7] = new Array(12)

MultiArray [7][0] = "أنثى"
MultiArray [7][1] = "ذكر"
MultiArray [7][2] = "ذكر"
MultiArray [7][3] = "أنثى"
MultiArray [7][4] = "أنثى"
MultiArray [7][5] = "ذكر"
MultiArray [7][6] = "أنثى"
MultiArray [7][7] = "ذكر"
MultiArray [7][8] = "ذكر"
MultiArray [7][9] = "ذكر"
MultiArray [7][10] = "ذكر"
MultiArray [7][11] = "ذكر"

MultiArray [8] = new Array(12)
MultiArray [8][0] = "ذكر"
MultiArray [8][1] = "أنثى"
MultiArray [8][2] = "ذكر"
MultiArray [8][3] = "أنثى"
MultiArray [8][4] = "أنثى"
MultiArray [8][5] = "ذكر"
MultiArray [8][6] = "أنثى"
MultiArray [8][7] = "ذكر"
MultiArray [8][8] = "أنثى"
MultiArray [8][9] = "أنثى"
MultiArray [8][10] = "أنثى"
MultiArray [8][11] = "أنثى"

MultiArray [9] = new Array(12)
MultiArray [9][0] = "أنثى"
MultiArray [9][1] = "ذكر"
MultiArray [9][2] = "أنثى"
MultiArray [9][3] = "ذكر"
MultiArray [9][4] = "أنثى"
MultiArray [9][5] = "أنثى"
MultiArray [9][6] = "ذكر"
MultiArray [9][7] = "ذكر"
MultiArray [9][8] = "ذكر"
MultiArray [9][9] = "ذكر"
MultiArray [9][10] = "أنثى"
MultiArray [9][11] = "ذكر"

MultiArray [10] = new Array(12)
MultiArray [10][0] = "ذكر"
MultiArray [10][1] = "أنثى"
MultiArray [10][2] = "ذكر"
MultiArray [10][3] = "أنثى"
MultiArray [10][4] = "أنثى"
MultiArray [10][5] = "أنثى"
MultiArray [10][6] = "ذكر"
MultiArray [10][7] = "ذكر"
MultiArray [10][8] = "ذكر"
MultiArray [10][9] = "ذكر"
MultiArray [10][10] = "أنثى"
MultiArray [10][11] = "أنثى"

MultiArray [11] = new Array(12)
MultiArray [11][0] = "أنثى"
MultiArray [11][1] = "ذكر"
MultiArray [11][2] = "أنثى"
MultiArray [11][3] = "أنثى"
MultiArray [11][4] = "ذكر"
MultiArray [11][5] = "ذكر"
MultiArray [11][6] = "ذكر"
MultiArray [11][7] = "ذكر"
MultiArray [11][8] = "ذكر"
MultiArray [11][9] = "أنثى"
MultiArray [11][10] = "أنثى"
MultiArray [11][11] = "أنثى"

MultiArray [12] = new Array(12)
MultiArray [12][0] = "ذكر"
MultiArray [12][1] = "أنثى"
MultiArray [12][2] = "أنثى"
MultiArray [12][3] = "أنثى"
MultiArray [12][4] = "أنثى"
MultiArray [12][5] = "أنثى"
MultiArray [12][6] = "أنثى"
MultiArray [12][7] = "أنثى"
MultiArray [12][8] = "أنثى"
MultiArray [12][9] = "أنثى"
MultiArray [12][10] = "ذكر"
MultiArray [12][11] = "ذكر"

MultiArray [13] = new Array(12)
MultiArray [13][0] = "ذكر"
MultiArray [13][1] = "أنثى"
MultiArray [13][2] = "ذكر"
MultiArray [13][3] = "أنثى"
MultiArray [13][4] = "أنثى"
MultiArray [13][5] = "أنثى"
MultiArray [13][6] = "أنثى"
MultiArray [13][7] = "أنثى"
MultiArray [13][8] = "أنثى"
MultiArray [13][9] = "أنثى"
MultiArray [13][10] = "أنثى"
MultiArray [13][11] = "ذكر"

MultiArray [14] = new Array(12)
MultiArray [14][0] = "ذكر"
MultiArray [14][1] = "أنثى"
MultiArray [14][2] = "ذكر"
MultiArray [14][3] = "أنثى"
MultiArray [14][4] = "أنثى"
MultiArray [14][5] = "أنثى"
MultiArray [14][6] = "أنثى"
MultiArray [14][7] = "أنثى"
MultiArray [14][8] = "أنثى"
MultiArray [14][9] = "أنثى"
MultiArray [14][10] = "أنثى"
MultiArray [14][11] = "ذكر"

MultiArray [15] = new Array(12)
MultiArray [15][0] = "أنثى"
MultiArray [15][1] = "ذكر"
MultiArray [15][2] = "ذكر"
MultiArray [15][3] = "ذكر"
MultiArray [15][4] = "أنثى"
MultiArray [15][5] = "أنثى"
MultiArray [15][6] = "أنثى"
MultiArray [15][7] = "ذكر"
MultiArray [15][8] = "أنثى"
MultiArray [15][9] = "أنثى"
MultiArray [15][10] = "أنثى"
MultiArray [15][11] = "ذكر"

MultiArray [16] = new Array(12)
MultiArray [16][0] = "ذكر"
MultiArray [16][1] = "أنثى"
MultiArray [16][2] = "ذكر"
MultiArray [16][3] = "أنثى"
MultiArray [16][4] = "أنثى"
MultiArray [16][5] = "أنثى"
MultiArray [16][6] = "أنثى"
MultiArray [16][7] = "أنثى"
MultiArray [16][8] = "أنثى"
MultiArray [16][9] = "أنثى"
MultiArray [16][10] = "ذكر"
MultiArray [16][11] = "ذكر"

MultiArray [17] = new Array(12)
MultiArray [17][0] = "ذكر"
MultiArray [17][1] = "ذكر"
MultiArray [17][2] = "أنثى"
MultiArray [17][3] = "ذكر"
MultiArray [17][4] = "أنثى"
MultiArray [17][5] = "أنثى"
MultiArray [17][6] = "أنثى"
MultiArray [17][7] = "ذكر"
MultiArray [17][8] = "أنثى"
MultiArray [17][9] = "أنثى"
MultiArray [17][10] = "ذكر"
MultiArray [17][11] = "ذكر"

MultiArray [18] = new Array(12)
MultiArray [18][0] = "أنثى"
MultiArray [18][1] = "ذكر"
MultiArray [18][2] = "ذكر"
MultiArray [18][3] = "أنثى"
MultiArray [18][4] = "ذكر"
MultiArray [18][5] = "أنثى"
MultiArray [18][6] = "أنثى"
MultiArray [18][7] = "أنثى"
MultiArray [18][8] = "ذكر"
MultiArray [18][9] = "ذكر"
MultiArray [18][10] = "ذكر"
MultiArray [18][11] = "ذكر"

MultiArray [19] = new Array(12)
MultiArray [19][0] = "ذكر"
MultiArray [19][1] = "أنثى"
MultiArray [19][2] = "ذكر"
MultiArray [19][3] = "ذكر"
MultiArray [19][4] = "أنثى"
MultiArray [19][5] = "ذكر"
MultiArray [19][6] = "أنثى"
MultiArray [19][7] = "ذكر"
MultiArray [19][8] = "أنثى"
MultiArray [19][9] = "ذكر"
MultiArray [19][10] = "أنثى"
MultiArray [19][11] = "ذكر"

MultiArray [20] = new Array(12)
MultiArray [20][0] = "أنثى"
MultiArray [20][1] = "ذكر"
MultiArray [20][2] = "أنثى"
MultiArray [20][3] = "ذكر"
MultiArray [20][4] = "ذكر"
MultiArray [20][5] = "أنثى"
MultiArray [20][6] = "ذكر"
MultiArray [20][7] = "أنثى"
MultiArray [20][8] = "ذكر"
MultiArray [20][9] = "أنثى"
MultiArray [20][10] = "ذكر"
MultiArray [20][11] = "أنثى"

MultiArray [21] = new Array(12)
MultiArray [21][0] = "ذكر"
MultiArray [21][1] = "أنثى"
MultiArray [21][2] = "ذكر"
MultiArray [21][3] = "ذكر"
MultiArray [21][4] = "ذكر"
MultiArray [21][5] = "أنثى"
MultiArray [21][6] = "أنثى"
MultiArray [21][7] = "ذكر"
MultiArray [21][8] = "أنثى"
MultiArray [21][9] = "ذكر"
MultiArray [21][10] = "أنثى"
MultiArray [21][11] = "أنثى"

MultiArray [22] = new Array(12)
MultiArray [22][0] = "أنثى"
MultiArray [22][1] = "ذكر"
MultiArray [22][2] = "أنثى"
MultiArray [22][3] = "ذكر"
MultiArray [22][4] = "أنثى"
MultiArray [22][5] = "ذكر"
MultiArray [22][6] = "ذكر"
MultiArray [22][7] = "أنثى"
MultiArray [22][8] = "ذكر"
MultiArray [22][9] = "أنثى"
MultiArray [22][10] = "ذكر"
MultiArray [22][11] = "أنثى"

MultiArray [23] = new Array(12)
MultiArray [23][0] = "ذكر"
MultiArray [23][1] = "أنثى"
MultiArray [23][2] = "ذكر"
MultiArray [23][3] = "أنثى"
MultiArray [23][4] = "ذكر"
MultiArray [23][5] = "أنثى"
MultiArray [23][6] = "ذكر"
MultiArray [23][7] = "ذكر"
MultiArray [23][8] = "أنثى"
MultiArray [23][9] = "ذكر"
MultiArray [23][10] = "أنثى"
MultiArray [23][11] = "ذكر"

MultiArray [24] = new Array(12)
MultiArray [24][0] = "أنثى"
MultiArray [24][1] = "ذكر"
MultiArray [24][2] = "أنثى"
MultiArray [24][3] = "ذكر"
MultiArray [24][4] = "أنثى"
MultiArray [24][5] = "ذكر"
MultiArray [24][6] = "أنثى"
MultiArray [24][7] = "ذكر"
MultiArray [24][8] = "ذكر"
MultiArray [24][9] = "أنثى"
MultiArray [24][10] = "ذكر"
MultiArray [24][11] = "أنثى"

MultiArray [25] = new Array(12)
MultiArray [25][0] = "ذكر"
MultiArray [25][1] = "أنثى"
MultiArray [25][2] = "ذكر"
MultiArray [25][3] = "أنثى"
MultiArray [25][4] = "ذكر"
MultiArray [25][5] = "أنثى"
MultiArray [25][6] = "ذكر"
MultiArray [25][7] = "أنثى"
MultiArray [25][8] = "ذكر"
MultiArray [25][9] = "ذكر"
MultiArray [25][10] = "ذكر"
MultiArray [25][11] = "ذكر"

MultiArray [26] = new Array(12)
MultiArray [26][0] = "ذكر"
MultiArray [26][1] = "ذكر"
MultiArray [26][2] = "أنثى"
MultiArray [26][3] = "ذكر"
MultiArray [26][4] = "ذكر"
MultiArray [26][5] = "ذكر"
MultiArray [26][6] = "أنثى"
MultiArray [26][7] = "ذكر"
MultiArray [26][8] = "أنثى"
MultiArray [26][9] = "ذكر"
MultiArray [26][10] = "أنثى"
MultiArray [26][11] = "أنثى"

MultiArray [27] = new Array(12)
MultiArray [27][0] = "أنثى"
MultiArray [27][1] = "ذكر"
MultiArray [27][2] = "ذكر"
MultiArray [27][3] = "أنثى"
MultiArray [27][4] = "أنثى"
MultiArray [27][5] = "أنثى"
MultiArray [27][6] = "ذكر"
MultiArray [27][7] = "أنثى"
MultiArray [27][8] = "ذكر"
MultiArray [27][9] = "أنثى"
MultiArray [27][10] = "ذكر"
MultiArray [27][11] = "ذكر"

var age = ddlAge.options[ddlAge.selectedIndex].value - 18
var month = ddlMonth.options[ddlMonth.selectedIndex].value - 1

ctrlSpanResult.innerHTML = MultiArray[age][month];
document.getElementById("divLook").style.display="block";
*/
  
}
