; var ajRequest = Array(); var ajRequestCnt = -1; function ajaxRetry(id) { if(typeof(ajRequest[id]) != "object") return; Rq = ajRequest[id]; getContent(Rq['url'], Rq['query'], Rq['cmd'], Rq['cmdOnError'], Rq['method']); ajRequest[id] = null; } function ajaxErMsg(url, query, cmd, cmdOnError, method, retry) { if(cmdOnError != ';' && cmdOnError != '') return; ajRequestCnt++; var currentRequest ={ 'url' : url, 'query' : query, 'cmd' : cmd, 'cmdOnError' : cmdOnError, 'method' : method }; ajRequest[ajRequestCnt] = currentRequest; return '<p align="center" dir="rtl">'+ 'متأسفانه ارتباط با سرور سايت قطع شده است.<br />'+ 'لطفاً پس از بررسی وضعيت ارتباط خود با اينترنت دوباره سعی کنيد.'+ '<br /><br />'+ '<a class="blue" href="javascript:ajaxRetry('+ajRequestCnt+')">'+ 'درصورتيکه ارتباط شما با اينترنت مشکلی ندارد اينجا کليک کنيد.</a></p>'; } function jeval(mainCmd, alternatecmd) { if(typeof(mainCmd) == "object"){ while(postScripts.length) try{ jeval(postScripts.pop()); }catch(e){} return; } if(typeof(mainCmd) == "undefined") mainCmd = ';'; if(mainCmd == ';' || mainCmd == '') mainCmd = alternatecmd; try{ eval(mainCmd); }catch(e){ if(typeof(console) == "object") console.log("Error in Ajax Script Code:\n"+e+"\n\n"+mainCmd); } } function createAjax() { try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {} try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} try { return new XMLHttpRequest(); } catch(e) {} return null; } function getContent(url, query, cmd, cmdOnError, method, retry) { if(typeof(query) == 'undefined') query = ''; try{ if(cmd.toUpperCase() == "GET" || cmd.toUpperCase() == "POST"){ method = cmd.toUpperCase(); cmd = ""; } }catch(e){} try{ if(cmdOnError.toUpperCase() == "GET" || cmdOnError.toUpperCase() == "POST"){ method = cmdOnError.toUpperCase(); cmdOnError = ""; } }catch(e){} if(typeof(cmdOnError)=='undefined') cmdOnError = ';'; if(typeof(method)=='undefined') method = 'GET'; else method = method.toUpperCase(); retry = (retry || 0); if(retry > 3){ Contents = ajaxErMsg(url, query, cmd, cmdOnError, method); jeval(cmdOnError, cmd); return; } var A = createAjax(); if(method == "GET") A.open(method, url+'?'+query+'&_r_=done'+Math.random(), true); else A.open(method, url, true); var onreadystatechange = function(i){ if(A.readyState==4) try{ if(A.status==200 || A.status == 304){ try{ Contents = A.responseText; postScripts = Array(); var ScriptCode, regexp = /<script([^>]*)>([\s\S]*?)<\/script>/gi; while (ScriptCode = regexp.exec(Contents)){ if(ScriptCode[1].toLowerCase().indexOf('postscript') == -1){ jeval(ScriptCode[2]); }else{ postScripts.push(ScriptCode[2]); } } jeval(cmd); jeval(postScripts); }catch(e){ Contents = ajaxErMsg(url, query, cmd, cmdOnError, method); jeval(cmdOnError, cmd); } }else getContent(url, query, cmd, cmdOnError, method, (retry+1)); }catch(e){ Contents = ajaxErMsg(url, query, cmd, cmdOnError, method); jeval(cmdOnError, cmd); } }; A.onreadystatechange = onreadystatechange; if(method == "GET") A.send(null); else{ var contentType = "application/x-www-form-urlencoded; charset=UTF-8"; A.setRequestHeader("Content-Type", contentType); A.send(query+'&_r_=done'+Math.random()); } } function createQuery(formN) { var elements = formN.elements; var pairs = new Array(); for (var i = 0; i < elements.length; i++) { if ((name = elements[i].name) && (value = elements[i].value)) if(elements[i].type == "radio" || elements[i].type == "checkbox"){ if(elements[i].checked) pairs.push(name + "=" + encodeURIComponent(value)); }else pairs.push(name + "=" + encodeURIComponent(value)); } return pairs.join("&"); } function xFormReset(formN) { if(typeof('formN') != 'object') formN = $(formN); var elements = formN.elements; for (var i = 0; i < elements.length; i++) { if ((name = elements[i].name) && (value = elements[i].value)) if(elements[i].type == "radio" || elements[i].type == "checkbox") elements[i].checked = false; else elements[i].value = ''; } } function xtoggleCkeckbox(formN, tvalue, pattern) { if(typeof(pattern) == "undefined") pattern = 'id:'; if(typeof(pattern) == "undefined") pattern = '2'; attrib = pattern.split(':')[0].toLowerCase(); pattern = pattern.split(':')[1]; if(typeof('formN') != 'object') formN = $(formN); var elements = formN.elements; for (var i = 0; i < elements.length; i++) if(elements[i].type == "radio" || elements[i].type == "checkbox"){ try{ if((attrib == 'id' && elements[i].id.indexOf(pattern) != -1) || (attrib == 'name' && elements[i].name.indexOf(pattern) != -1)) elements[i].checked = (tvalue==1||tvalue==0)?tvalue:!elements[i].checked; }catch(e){} } } function array2string(inArray) { var out = ''; var key; for(key in inArray) if(typeof(inArray[key]) != 'function') out += inArray[key]+'*'; if(out.length > 1) if(out.substr(out.length - 1) == '*') out = out.substr(0, out.length - 1); return out; } ; var $ = function (eName) { return document.getElementById(eName); }; function E_(num) { num = String(num); num = (num).replace(/۰/g, '0'); num = (num).replace(/۱/g, '1'); num = (num).replace(/۲/g, '2'); num = (num).replace(/۳/g, '3'); num = (num).replace(/۴/g, '4'); num = (num).replace(/۵/g, '5'); num = (num).replace(/۶/g, '6'); num = (num).replace(/۷/g, '7'); num = (num).replace(/۸/g, '8'); num = (num).replace(/۹/g, '9'); num = (num).replace(/٤/g, '4'); num = (num).replace(/٥/g, '5'); num = (num).replace(/٦/g, '6'); return num; } function F_(num) { num = String(num); num = (num).replace(/0/g, '۰'); num = (num).replace(/1/g, '۱'); num = (num).replace(/2/g, '۲'); num = (num).replace(/3/g, '۳'); num = (num).replace(/4/g, '۴'); num = (num).replace(/5/g, '۵'); num = (num).replace(/6/g, '۶'); num = (num).replace(/7/g, '۷'); num = (num).replace(/8/g, '۸'); num = (num).replace(/9/g, '۹'); return num; } function xgoTo(url) { document.location.href = url; } function xFindPosX(obj) { if(typeof(obj) != "object") obj = $(obj); var curleft = 0; if (obj.offsetParent){ while (obj.offsetParent){ curleft += obj.offsetLeft; obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function xFindPosY(obj) { if(typeof(obj) != "object") obj = $(obj); var curtop = 0; if (obj.offsetParent){ while (obj.offsetParent){ curtop += obj.offsetTop; obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } function xRemovePX(strNum) { return strNum.substr(0, strNum.length - 2) * 1; } function xArraySearch(value, array) { var key; for (key in array) if(typeof(array[key]) != 'function') { if (value === array[key]) { return key; } } return false; } function xGetInt(str, float) { if(typeof(float) == "undefined") float = false; var STR = ""; var neg = (str.charAt(0) == '-')?true:false; for(var i=0; i<str.length; i++) if(str.charAt(i) in ['0','1','2','3','4','5','6','7','8','9']) STR += str.charAt(i); else if(float && str.charAt(i) == '.') STR += '.'; if(neg) return STR * -1; else return STR * 1; } function xDigitGroup(str) { str = str+''; var len = str.length; var newstr = str.charAt(len-1); for (var i=1; i<len; i++) { if ((i % 3)==0) newstr = ','+newstr; newstr = str.charAt(len-1-i)+newstr; } return newstr; } function xMakeVisible(obj, d) { if(!obj) return; try{ if(typeof(d) == "undefined") d = false; if(typeof(obj) != "object") obj = $(obj); if(!d) obj.style.display = ''; obj.style.visibility = "visible"; }catch(e){} } function xMakeHidden(obj, d) { if(!obj) return; try{ if(typeof(d) == "undefined") d = false; if(typeof(obj) != "object") obj = $(obj); if(!d) obj.style.display = 'none'; obj.style.visibility = "hidden"; }catch(e){} } function xtoggleObj(Obj, Cmd) { if(Obj.indexOf(':') == -1){ Obj = Obj.split(','); for(key in Obj) try{ if(typeof(Obj[key]) == "string") Obj[key] = $(Obj[key]); if(Obj[key].style.display == "none" || Obj[key].style.visibility == "hidden") xMakeVisible(Obj[key]); else xMakeHidden(Obj[key]); } catch(e){} }else{ HideObj = Obj.substr(0, Obj.indexOf(':')).split(','); VisibleObj = Obj.substr(Obj.indexOf(':')+1).split(','); for(key in HideObj) try{ if(typeof(HideObj[key]) == 'string') xMakeHidden(HideObj[key]); }catch(e){} for(key in VisibleObj) try{ if(typeof(VisibleObj[key]) == 'string') xMakeVisible(VisibleObj[key]); }catch(e){} } if(typeof(Cmd) != 'undefined') try{ eval(Cmd); }catch(e){} } function xsetCookie(cookieName, cookieValue, path, domain, expires, secure) { if(expires == '' || typeof(expires) == "undefined"){ expires = new Date(); expires.setMonth(expires.getMonth()+1) ; } if(typeof(domain) == "undefined") domain = document.location.href.replace(/\w+\:\/\/([^\/]+)(.*)/, '$1'); if(typeof(path) == "undefined") path = document.location.href.replace(/\w+\:\/\/([^\/]+)(.*)\/\w+\.\w+/, '$2'); try{ document.cookie = escape(cookieName) + '=' + escape(cookieValue) + (expires ? '; EXPIRES=' + expires.toGMTString() : '') + (path ? '; PATH=' + path : '') + (domain ? '; DOMAIN=' + domain : '') + (secure ? '; SECURE' : ''); }catch(e){} } function xgetCookie(cookieName) { var cookieValue = null; var posName = document.cookie.indexOf(escape(cookieName) + '='); if (posName != -1){ var posValue = posName + (escape(cookieName) + '=').length; var endPos = document.cookie.indexOf(';', posValue); if (endPos != -1){ cookieValue = unescape(document.cookie.substring(posValue, endPos)); } else{ cookieValue = unescape(document.cookie.substring(posValue)); } } return cookieValue; } var browser = 'unknown'; Mbr = navigator.userAgent.toLowerCase(); if (Mbr.indexOf("opera") != -1) browser = 'opera'; else if (Mbr.indexOf("msie") != -1) browser = 'msie'; else if (Mbr.indexOf("gecko") != -1) browser = 'gecko'; var _xImages = new Array(); function xloadImages() { var i,key; for (i=0; i<_xloadImages.arguments.length; i++) { if (typeof(_xloadImages.arguments[i]) == 'string') { _xImages.push(document.createElement('img')); _xImages[_xImages.length-1].src = _xloadImages.arguments[i]; } else if (typeof(_xloadImages.arguments[i]) == 'object') for(key in _xloadImages.arguments[i]) if(typeof(_xloadImages.arguments[i][key]) != 'function') { _xImages.push(document.createElement('img')); _xImages[_xImages.length-1].src = _xloadImages.arguments[i][key]; } } } _xloadImages = xloadImages; function xBtnCreate(obj, cmd, cmd2, type) { if(typeof(cmd2) == "undefined") cmd2 = ""; if(typeof(type) == "undefined") type = "normal"; if(type == "check"){ oName = (obj.name)?obj.name:obj.id; if(oName.length < 1) oName = "rcoId"+Math.round(Math.random()*9999); var Obj = document.createElement('input'); Obj.type = 'hidden'; Obj.name = oName+"IN"; Obj.id = oName+"IN"; Obj.value = 0; obj.parentNode.appendChild(Obj); if(!obj.id) obj.id = oName; } var img = new Array(); var tmp = obj.src.split('/images/'); img['path'] = tmp[0]+"/images/"; tmp = tmp[1].split('.'); img['img'] = tmp[0]; img['ext'] = tmp[1]; if(typeof(img['img']) == 'undefined' || img['img'] == 'undefined' ) return; _xloadImages (img['path']+img['img']+"."+ img['ext'], img['path']+img['img']+"-over"+"."+img['ext'], img['path']+img['img']+"-down"+"."+img['ext'] ); obj.style.cursor = "pointer"; doWhileUp = function(OBJid, CMD, targetV1, targetV2){ try{ OBJ = $(OBJid); if(OBJ.src != targetV1 && OBJ.src != targetV2){ eval(CMD); setTimeout("doWhileUp('"+OBJid+"', '"+CMD+"', '"+targetV1+"', '"+targetV2+"')", 50); } } catch(e){} }; obj.onmouseover = function(){ if(obj.src == img['path']+img['img']+"-down."+img['ext']) obj.src=img['path']+img['img']+"-down-over."+img['ext']; else obj.src=img['path']+img['img']+"-over."+img['ext']; }; obj.onmouseout = function(){ if(obj.src == img['path']+img['img']+"-down-over."+img['ext']) obj.src=img['path']+img['img']+"-down."+img['ext']; else obj.src=img['path']+img['img']+"."+img['ext']; }; obj.onmouseup = function(){ if(type == "check"){ if ($(obj.id+"IN").value == '0') obj.src=img['path']+img['img']+"-down-over."+img['ext']; else obj.src=img['path']+img['img']+"-over."+img['ext']; $(obj.id+"IN").value = ($(obj.id+"IN").value == '1')?0:1; }else obj.src=img['path']+img['img']+"-over."+img['ext']; }; obj.onmousedown = function(){ obj.src=img['path']+img['img']+"-down."+img['ext']; if(typeof(cmd2) != "undefined" && cmd2.length > 0) doWhileUp(obj.id, cmd2, img['path']+img['img']+"-over."+img['ext'], img['path']+img['img']+"."+img['ext']); }; obj.onclick = function(){ try{ eval(cmd); } catch(e){} }; obj.onload = function(){ }; obj.ondblclick = function(){ obj.src=img['path']+img['img']+"."+img['ext']; }; } function opacity(Oid, opacStart, opacEnd, millisec, cmd) { var speed = Math.round(millisec / 100); var timer = 0; if(typeof(cmd) == "undefined") cmd = ";"; if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i--){ setTimeout("changeOpac(" + i + ",'" + Oid + "')",(timer * speed)); timer++; } } else if(opacStart < opacEnd){ for(i = opacStart; i <= opacEnd; i++){ setTimeout("changeOpac(" + i + ",'" + Oid + "')",(timer * speed)); timer++; } } setTimeout("try{"+cmd+"}catch(e){};",(timer * speed)); } function changeOpac(opacity, Oid) { try{ var object = $(Oid); }catch(e){} if(typeof(object) != "object") return; object = object.style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } function moveIt(obj, attr, start, end, cmd, speed) { if(typeof(obj) != "object") obj = $(obj); if(typeof(speed) == "undefined") speed = 9; if(typeof(attr) == "undefined") attr = 'style.left'; var step = Math.round(Math.abs(start-end)/speed); var move = Math.abs(end - start); var startPos = start; for(i=0;i<=step;i++){ move = Math.ceil((end - startPos)/speed); if(start > end) move --; if((startPos+move >= end && start <= end) || (startPos+move <= end && start > end)) break; setTimeout('$("'+obj.id+'").'+attr+' = "'+(startPos+move)*-1+'px";', i*50); startPos += move; } setTimeout('$("'+obj.id+'").'+attr+' = "'+end*-1+'px";', i*50); setTimeout('try{'+cmd+';}catch(e){}', i*50); } var xkbFarsi = true ; var xkbTarget = null; var xkbMap = { 39:1711, 126:215, 44:1608, 59:1603, 63:1567, 98:1584, 68:1610, 100:1610, 71:1604, 103:1604, 72:1570, 124:247, 78:1583, 110:1583, 77:1569, 116:1601, 66:1573, 91:1580, 92:1662, 93:1670, 96:1662, 65:1588, 97:1588, 67:1688, 99:1586, 88:1610, 69:1579, 101:1579, 70:1576, 102:1576, 104:1575, 73:1607, 105:1607, 74:1578, 106:1578, 75:1606, 107:1606, 76:1605, 108:1605, 109:1574, 78:1583, 110:1583, 79:1582, 111:1582, 80:1581, 112:1581, 81:1590, 113:1590, 82:1602, 114:1602, 87:1587, 119:1587, 85:1593, 117:1593, 86:1585, 118:1585, 87:1589, 119:1589, 120:1591, 89:1594, 121:1594, 90:1592, 122:1592, 44:1608, 84:1548, 83:1587, 115:1587, 48:1776, 49:1777, 50:1778, 51:1779, 52:1780, 53:1781, 54:1782, 55:1783, 56:1784, 57:1785 }; function xConvertFarsi(fld,e, kbStat) { xkbTarget = e.target; if(typeof(kbStat) == "undefined") kbStat = xkbFarsi; if(!kbStat) return true; k =(browser == "msie") ? event.keyCode : e.which ; if (xkbFarsi && typeof(xkbMap[k])=='number') { if (browser == "msie") event.keyCode = xkbMap[k] ; else if (browser == 'gecko') { var EVT = document.createEvent("KeyEvents") ; EVT.initKeyEvent("keypress", true, true, document.defaultView, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, 0, String.fromCharCode(xkbMap[k]).charCodeAt(0)) ; e.preventDefault() ; e.target.dispatchEvent(EVT) ; } else if (browser == 'opera') { fld.value = fld.value + String.fromCharCode(xkbMap[k]); return false ; } } } function xChangeLang(kbStat, Objid) { kbVar = (typeof(kbStat) == "undefined")?'xkbFarsi':kbStat; kbStat = eval(kbVar); kbStat = !kbStat; eval(kbVar+' = '+kbStat); if(kbStat){ for(i=1;i<=22;i++) setTimeout('$("'+Objid+'").style.backgroundPosition = "0 -'+i+'px";', i*10); }else{ for(i=21;i>=0;i--) setTimeout('$("'+Objid+'").style.backgroundPosition = "0 -'+i+'px";', 210-i*10); } $(Objid).blur(); try{ xkbTarget.focus(); }catch(e){} } function xsubmitForm(formid, destination, loading) { if(typeof(loading) == "undefined"){ loading = '<br /><br /><br /><br />'+ '<center>'+ '<div class="whiteBoxHolder" style="width:230px;margin:0 auto;text-align:left;">'+ '<div class="BoxHeader"><div></div></div>'+ '<div class="BoxContent">'+ '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /><br /></tr>'+ '<tr>'+ '<td>'+ 'لطفاً صبر کنيد '+ '</td><td>'+ '<img src="../images/them/loading.gif" width="16" height="16" alt="" />'+ '</td>'+ '</tr>'+ '<tr><td><br /><br /><br /><br /></tr>'+ '</table>'+ '</div>'+ '<div class="BoxFooter"><div></div></div>'+ '</div>'+ '</center>'+ '<br /><br /><br /><br />'; } if(typeof(formid) == "undefined" || typeof(destination) == "undefined") return; var form = ($(formid))?$(formid):eval('document.forms.'+formid); var FormCont = createQuery(form); try{ $(destination).innerHTML = loading; }catch(e){} getContent('index.php', ''+FormCont+'&_r_'+Math.random(), '$(\''+destination+'\').innerHTML = Contents;', '', form.method||'POST'); } function xresizeWindow(w, h) { if(typeof(w) == "undefined"){ w = screen.width; h = screen.height; } if(typeof(h) == "undefined") h = w; if(window.innerWidth){ window.innerWidth = w; window.innerHeight = h; }else window.resizeTo(w+30, h+100); } var Class = function(properties) { var klass = function(){ if (this.initialize && arguments[0] != 'noinit') return this.initialize.apply(this, arguments); else return this; }; for (var property in this) klass[property] = this[property]; klass.prototype = properties; return klass; }; Class.empty = function(){}; Class.prototype = { extend: function(properties){ var pr0t0typ3 = new this('noinit'); var parentize = function(previous, current){ if (!previous.apply || !current.apply) return false; return function(){ this.parent = previous; return current.apply(this, arguments); }; }; for (var property in properties){ var previous = pr0t0typ3[property]; var current = properties[property]; if (previous && previous != current) current = parentize(previous, current) || current; pr0t0typ3[property] = current; } return new Class(pr0t0typ3); }, implement: function(properties){ for (var property in properties) this.prototype[property] = properties[property]; } }; ; function xCheckBox(obj, sensitive, checked, onChange) { if(typeof(sensitive) != "object") sensitive = obj; if(typeof(checked) == "undefined") checked = false; if(typeof(onChange) == "undefined") onChange = ';'; obj.onload = function(){}; sensitive.style.cursor = "pointer"; var Src = obj.src.substr(0, obj.src.length - 4); var Ext = obj.src.substr(obj.src.length - 4); var inp = document.createElement('input'); inp.type = 'hidden'; inp.value = (false)?1:0; var oName = ((obj.name)?obj.name:obj.id); if(oName.length < 1){ oName = "rcoId"+Math.round(Math.random()*9999); } oName += 'inp'; inp.name = oName; inp.id = oName; obj.parentNode.appendChild(inp); sensitive.onmouseover = function(){ obj.src = (inp.value == '0')?Src+ '-over' + Ext:Src + "-select-over" +Ext; }; sensitive.onmouseout = function(){ obj.src = (inp.value == '0')?Src + Ext:Src + "-select" +Ext; }; sensitive.onclick = function(){ if(inp.value == '0'){ obj.src = Src + '-select-over' + Ext; inp.value = '1'; } else { obj.src = Src + '-over' + Ext; inp.value = '0'; } }; if(obj != sensitive){ obj.onmouseover = sensitive.onmouseover; obj.onmouseout = sensitive.onmouseout; obj.onclick = sensitive.onclick; } if(checked){ obj.onclick(); obj.onmouseout(); } } function xRadioBtn(obj, sensitive, group, checked, onChange) { if(typeof(sensitive) != "object") sensitive = obj; if(typeof(checked) == "undefined") checked = false; if(typeof(onChange) == "undefined") onChange = ';'; obj.onload = function(){}; sensitive.style.cursor = "pointer"; var Src = obj.src.substr(0, obj.src.length - 4); var Ext = obj.src.substr(obj.src.length - 4); sensitive.onmouseover = function(){ obj.src = ($(group).value != obj.name)?Src+ '-over' + Ext:Src + "-select-over" +Ext; }; sensitive.onmouseout = function(){ obj.src = ($(group).value != obj.name)?Src + Ext:Src + "-select" +Ext; }; sensitive.onclick = function(){ if($(group).value != obj.name){ obj.src = Src + '-select-over' + Ext; if($(group).value){ $($(group).value).src = Src + Ext; } $(group).value = obj.name; try{ eval(onChange); } catch(e){} } }; if(obj != sensitive){ obj.onmouseover = sensitive.onmouseover; obj.onmouseout = sensitive.onmouseout; obj.onclick = sensitive.onclick; } if(checked){ obj.onclick(); obj.onmouseout(); } } function xDigitInput(obj, defV, minV, maxV, diLen, cmdAfterDone) { if(typeof(obj) != "object") obj = $(obj); if(typeof(cmdAfterDone) == "undefined") cmdAfterDone = ""; digitInput = function (delta, obj, minV, maxV, cmdAfterDone) { if(typeof(minV) == "undefined") minV = 0; if(typeof(maxV) == "undefined") maxV = 99; var Cv = xGetInt($(obj).value) * 1; Cv = Cv*1 + delta; if(Cv < maxV) if(Cv >= minV) $(obj).value = Cv; else $(obj).value = minV; else $(obj).value = maxV; try{ eval(cmdAfterDone); } catch(e){} }; digitInputKey = function (e, obj, minV, maxV, cmdAfterDone) { if (window.event){ key = window.event.keyCode; }else{ key = e.which; } if(key == 38 || key == 39) digitInput(1, obj, minV, maxV, cmdAfterDone); else if(key == 37 || key == 40) digitInput(-1, obj, minV, maxV, cmdAfterDone); }; var diWidth = obj.clientWidth; var diHeight = obj.clientHeight; var diName = obj.name; var diID = obj.id; var diTitle = obj.alt; var dir = obj.style.direction; dir = (dir == "ltr")?"rtl":"ltr"; if(typeof(diLen) == "undefined") diLen = 2; if(typeof(diHeight) == "undefined") diHeight = 20; if(typeof(diWidth) == "undefined") diWidth = 120; if(typeof(diTitle) == "undefined") diTitle = ""; if(typeof(maxV) == "undefined") maxV = 10; if(typeof(minV) == "undefined") minV = 0; if(typeof(defV) == "undefined") defV = 1; diSize = diLen * 7; _xloadImages('../images/diDown.gif','../images/diUp.gif'); var HTML11 = '<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #FFFFFF; width:'+ diWidth +'px;height:'+ diHeight +'px;direction:'+ dir +'">'+ '<tr>'+ '<td colspan="3" style="background-color: #205E16"><img border="0" src="../images/blank.gif" width="1" height="1" /></td>'+ '</tr>'+ '<tr>'+ '<td style="background-color: #205E16"><img border="0" src="../images/blank.gif" width="1" height="1" /></td>'+ '<td width="100%">'+ '<table border="0" cellpadding="0" cellspacing="0" width="100%">'+ '<tr>'; if(diTitle.substr(0,1) != '~') HTML11 = HTML11+'<td rowspan="2" width="100%" style="direction:rtl;vertical-align:middle;font-family:Tahoma; font-size:12px;">'+ diTitle +'</td>'+ '<td rowspan="2" width="100%" style="direction:rtl;vertical-align:middle">&nbsp;</td>'; HTML11 = HTML11+'<td rowspan="2">'+ '<input onfocus="digitInput(0, this.id, '+ minV +', '+ maxV +', \''+ cmdAfterDone +'\')" '+ 'onkeydown="digitInputKey(event, this.id, '+ minV +', '+ maxV +', \''+ cmdAfterDone +'\');" '+ 'onblur="digitInput(0, this.id, '+ minV +', '+ maxV +', \''+ cmdAfterDone +'\')" '+ 'type="text" value="'+ defV +'" name="'+ diName +'" id="'+ diID +'" '+ 'size="'+ diLen +'" style="height:'+ (diHeight-4) +'px;width:'+ diSize +'px;border:0;text-align:right;font-family:Georgia, Arial; font-size:12px;" />'+ '</td>'; if(diTitle.substr(0,1) == '~') HTML11 = HTML11+'<td rowspan="2" width="100%" style="direction:rtl;vertical-align:middle;font-family:Tahoma; font-size:12px;">'+ diTitle.substr(1) +'</td>'+ '<td rowspan="2" width="100%" style="direction:rtl;vertical-align:middle">&nbsp;</td>'; HTML11 = HTML11+'<td rowspan="2">&nbsp;</td>'+ '<td>'+ '<img onLoad="xBtnCreate(this, \'digitInput(1, \\\''+ diID +'\\\', '+ minV +', '+ maxV +', \\\''+ cmdAfterDone +'\\\');\')" border="0" src="../images/diUp.gif" width="17" height="9">'+ '</td>'+ '</tr>'+ '<tr>'+ '<td>'+ '<img onLoad="xBtnCreate(this, \'digitInput(-1, \\\''+ diID +'\\\', '+ minV +', '+ maxV +', \\\''+ cmdAfterDone +'\\\');\')" border="0" src="../images/diDown.gif" width="17" height="9">'+ '</td>'+ '</tr>'+ '</table>'+ '</td>'+ '<td style="background-color: #205E16"><img border="0" src="../images/blank.gif" width="1" height="1" /></td>'+ '</tr>'+ '<tr>'+ '<td colspan="3" style="background-color: #205E16"><img border="0" src="../images/blank.gif" width="1" height="1" /></td>'+ '</tr>'+ '</table>'; obj.parentNode.innerHTML = HTML11; } var xpopupWin = new Class({ initialize: function(name, OBJ, width, caption){ this.winMainPage = '../global/index.php'; this.winObj = OBJ; this.winName = name; this.winCaption = (typeof(caption)=='undefined')?OBJ:caption; this.winStatus = 'none'; this.winLastPage = ''; this.winHtml = '<table border="0" cellpadding="0" cellspacing="0" style="width:100%;">'+ '<tr>'+ '<td style="background:url(../images/them/xwindows.gif) left -305px; width:15px; height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) repeat 0px -365px ;height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) left -320px; width:15px; height:15px"></td>'+ '</tr>'+ '<tr>'+ '<td style="width:15px;background:url(../images/them/xwindowsBG.gif) repeat"></td>'+ '<td>'+ '<div>'+ '<div style="width:100%;height:23px;background:url(../images/them/xwindows.gif) repeat-x 0px -495px;border:1px solid #969696;border-bottom:0;">'+ '<img src="../images/blank.gif" id="'+this.winName+'BtnClose" width="19" height="19" alt="" title="بستن پنجره" style="margin:2px 4px 2px 2px; float:right" />'+ '<img src="../images/blank.gif" id="'+this.winName+'BtnNewOpen" width="19" height="19" alt="" title="نمايش در پنجره مجزا" style="margin:2px 0px; float:right;" />'+ '<img src="../images/blank.gif" id="'+this.winName+'BtnMinimize" width="19" height="19" alt="" title="تغيير وضعيت پنجره" style="margin:2px; float:right" />'+ '<img src="../images/blank.gif" id="'+this.winName+'BtnReload" width="19" height="19" alt="" title="بارگذاری مجدد" style="margin:2px 5px; float:right" />'+ '<div id="'+this.winName+'Title" style="width:140px;float:right;padding:2px 10px 0;text-align:right"></div>'+ '</div>'+ '<div style="width:100%; background:#FFFFFF;border:1px solid #969696; border-bottom:0;">'+ '<table id="'+this.winName+'MainTable" border="0" cellpadding="0" cellspacing="5" style="width:100%;; background:#DADADA">'+ '<tr>'+ '<td align="center" id="'+this.winName+'Container">'+ '</td>'+ '</tr>'+ '</table>'+ '</div>'+ '<div style="width:100%;height:20px;background:#FFFFFF url(../images/them/xwindows.gif) no-repeat left -475px;text-align:right;border:1px solid #969696;color:#666666;" id="'+this.winName+'Status"></div>'+ '</div>'+ '</td>'+ '<td style="width:15px;background:url(../images/them/xwindowsBG.gif) repeat"></td>'+ '</tr>'+ '<tr>'+ '<td style="background:url(../images/them/xwindows.gif) left -335px; width:15px; height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) repeat 0px -365px ;height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) left -350px; width:15px; height:15px"></td>'+ '</tr>'+ '</table>'; this.loadingHtml = '<div class="whiteBoxHolder" style="margin:0; width:300px;text-align:left">'+ '<div class="BoxHeader"><div></div></div>'+ '<div class="BoxContent" style="margin:0; padding:100px 0;">'+ '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/iconTimeout.gif" width="1" height="1" style="visibility:hidden" alt="" /><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '</table>'+ '</div>'+ '<div class="BoxFooter""><div></div></div>'+ '</div>'; this.errorHtml = '<div class="whiteBoxHolder" style="margin:0; width:300px;text-align:left">'+ '<div class="BoxHeader"><div></div></div>'+ '<div class="BoxContent" style="margin:0; padding:100px 0;">'+ '<table border="0" cellpadding="0" cellspacing="0" width="300" style="margin:0 auto; text-align:right; padding:20px;">'+ '<tr>'+ '<td></td>'+ '<td><img src="../images/them/iconTimeout.gif" width="24" height="24" alt="" /></td>'+ '</tr>'+ '<tr>'+ '<td colspan="2" style="text-align:right;">دريافت اطلاعات با مشکل مواجه شد. لطفاً بعد از بررسی ارتباط خود با اينترنت دوباره سعی کنيد</td>'+ '</tr>'+ '</table>'+ '</div>'+ '<div class="BoxFooter""><div></div></div>'+ '</div>'; this.miniHtml = '<div style="width:100%;height:23px;background:url(../images/them/xwindows.gif) repeat-x 0px -495px;border:1px solid #969696;">'+ '<img src="../images/blank.gif" id="'+this.winName+'BtnCloseMini" width="19" height="19" alt="" title="بستن پنجره" style="margin:2px 4px 2px 2px; float:right" />'+ '<img src="../images/blank.gif" id="'+this.winName+'BtnMaximizeMini" width="19" height="19" alt="" title="بزرگ کردن پنجره" style="margin:2px; float:right;" />'+ '<div id="'+this.winName+'miniTitle" style="width:140px;float:left;padding:2px 0 0 10px;"></div>'+ '</div>'; this.winHolder = "xpopupHolder" + this.winName; this.winWidth = (typeof(width) == "undefined")?200:width; this.winPage = ''; this.winCmd = ''; this.winDirectUrl = ''; this.onClose = ''; this.onOpen = ''; this.onMinimize = ''; this.onMaximize = ''; this.onLoad = ''; this.imageUrl = '../images/them/xwindows.gif'; this.imgObj = null; }, create: function(){ var Obj = document.createElement('div'); Obj.id = this.winHolder; Obj.style.width = "750px"; Obj.style.position = "absolute"; Obj.style.top = "100px"; Obj.style.left = "100px"; document.getElementsByTagName('body')[0].appendChild(Obj); Obj.innerHTML = this.winHtml; this.winStatus = 'created'; this.imgObj = new xBtn(this.imageUrl); this.loadbtn(1); }, loadbtn: function(whiche){ switch(whiche){ case 1: this.imgObj.create(this.winName+'BtnClose', 0, 1, this.winObj+'.hide(this);'); this.imgObj.create(this.winName+'BtnMinimize', 114, 1, this.winObj+'.minimize(this);'); this.imgObj.create(this.winName+'BtnReload', 171, 1, this.winObj+'.reload(this);'); break; case 2: this.imgObj.create(this.winName+'BtnCloseMini', 0, 1, this.winObj+'.hide(this);'); this.imgObj.create(this.winName+'BtnMaximizeMini', 57, 1, this.winObj+'.maximize(this);'); break; } }, show: function(page, cmd){ if(this.winStatus == 'none') this.create(); this.maximize(); $(this.winHolder).style.width = (this.winWidth*1+50) +"px"; this.winPage = page; this.winCmd = cmd; if(this.winLastPage != page+"#"+cmd) { this.loading(); this.fetch(); } this.winLastPage = page+"#"+cmd; var sw = document.getElementsByTagName("body")[0].clientWidth || screen.width; var sl = Math.round((sw - this.winWidth )/2); st = 90+document.documentElement.scrollTop-0; $(this.winHolder).style.top = st + 'px'; $(this.winHolder).style.left = sl + 'px'; xMakeVisible(this.winHolder); this.winStatus = 'visible'; $(this.winName+'Title').innerHTML = this.winCaption; var cmd = this.onOpen.split(';'); for(key in cmd) try{ eval(cmd[key]); }catch(e){} }, hide: function(){ if(this.winStatus == 'none') return; xMakeHidden(this.winHolder); try{ xMakeHidden(this.winName+'mini'); }catch(e){} this.winStatus = 'hidden'; var cmd = this.onClose.split(';'); for(key in cmd) try{ eval(cmd[key]); }catch(e){} }, loading: function(){ $(this.winName+"Container").innerHTML = this.loadingHtml; }, fetch: function(){ this.winDirectUrl = ''; this.checkdirect(); this.status("درحال بارگذاری..."); getContent( this.winMainPage, 'section=guest&module='+this.winPage+'&'+this.winCmd, '$("'+this.winName+'Container").innerHTML = Contents;'+ this.winObj+'.status("انجام شد");'+ this.winObj+'.checkdirect();'+ 'eval(\''+this.onLoad+'\');', this.winObj+'.error();', 'GET' ); }, reload: function(){ this.loading(); this.fetch(this.winPage, this.winCmd); }, status: function(text){ $(this.winName+"Status").innerHTML = "<div style='direction:rtl'>&nbsp;&nbsp;&nbsp;" + text + "&nbsp;&nbsp;&nbsp;</div>"; }, maximize: function(){ var cmd = this.onMaximize.split(';'); for(key in cmd) try{ eval(cmd[key]); }catch(e){} var sw = document.getElementsByTagName("body")[0].clientWidth || screen.width; var sl = Math.round((sw - this.winWidth )/2); st = 90+document.documentElement.scrollTop-0; $(this.winHolder).style.top = st + 'px'; $(this.winHolder).style.left = sl + 'px'; if($('fixBox')){ try{ xMakeHidden(this.winName+'mini'); }catch(e){} xMakeVisible(this.winHolder); }else{ xMakeVisible(this.winName+'MainTable'); this.imgObj.create(this.winName+'BtnMinimize', 114, 1, this.winObj+'.minimize();'); } this.winStatus = 'visible'; }, minimize: function(){ if(this.winStatus != 'visible') return; if($('fixBox')){ xMakeHidden(this.winHolder); this.makemini(); xMakeVisible(this.winName+'mini'); }else{ xMakeHidden(this.winName+'MainTable'); this.imgObj.create(this.winName+'BtnMinimize', 57, 1, this.winObj+'.maximize();'); } this.winStatus = 'minimize'; var cmd = this.onMinimize.split(';'); for(key in cmd) try{ eval(cmd[key]); }catch(e){} }, makemini: function(){ if(!$(this.winName+'mini')){ var Obj = document.createElement('div'); Obj.id = this.winName+'mini'; Obj.style.width = "200px"; Obj.style.margin = "0px 2px"; Obj.style.cssFloat = "left"; $('fixBox').appendChild(Obj); Obj.innerHTML = this.miniHtml; this.loadbtn(2); } $(this.winName+'miniTitle').innerHTML = this.winCaption; }, checkdirect:function(){ if(this.winDirectUrl.length <= 1){ this.imgObj.show(this.winName+'BtnNewOpen', 285, 0); }else{ this.imgObj.create(this.winName+'BtnNewOpen', 228, 1, this.winObj+'.opennewwin();'); } }, error: function(){ this.status("اشکال در دريافت اطلاعات!"); $(this.winName+"Container").innerHTML = this.errorHtml; }, opennewwin: function(){ if(this.winDirectUrl != ''){ window.open(this.winDirectUrl, '_blank'); }else{ xHint($(this.winName+'BtnNewOpen'), 'متأسفانه لينک مستقيم به اين قسمت وجود ندارد\nلطفاً پس از تکميل بارگذاری دوباره سعی نمائيد', 'لينک مستفيم', 'error', 270, 'rtl', 5); } } }); var xpopupBox = new Class({ initialize: function(name, Obj, width, parent){ this.boxMainPage = '../global/index.php'; this.boxName = name; this.boxObj = Obj; this.boxHolder = "popupBoxHolder"+name; this.boxWidth = (width+62)||350; this.boxHtml = '<table border="0" cellpadding="0" cellspacing="0" width="'+this.boxWidth+'">'+ '<tr>'+ '<td style="background:url(../images/them/xwindows.gif) left -305px; width:15px; height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) repeat 0px -365px ;height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) left -320px; width:15px; height:15px"></td>'+ '</tr>'+ '<tr>'+ '<td style="width:15px;background:url(../images/them/xwindowsBG.gif) repeat"></td>'+ '<td style="background:#DADADA; padding:5px;">'+ '<div class="whiteBoxHolder" style="text-align:left; padding:0;width:100%;">'+ '<div class="BoxHeader"><div></div></div>'+ '<div class="BoxContent" style="padding:0px 4px 4px;text-align:right;">'+ '<img src="../images/blank.gif" id="'+this.boxName+'BtnClose" width="18" height="18" alt="" border="0" />'+ '</div>'+ '<div class="BoxLine"></div>'+ '<div class="BoxContent" style="padding:0;" id="'+this.boxName+'Cont">'+ '</div>'+ '<div class="BoxFooter"><div></div></div>'+ '</div>'+ '</td>'+ '<td style="width:15px;background:url(../images/them/xwindowsBG.gif) repeat;"></td>'+ '</tr>'+ '<tr>'+ '<td style="background:url(../images/them/xwindows.gif) left -335px; width:15px; height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) repeat 0px -365px ;height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) left -350px; width:15px; height:15px"></td>'+ '</tr>'+ '</table>'; this.loadingHtml = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr>'+ '<td colspan="2" height="50"></td>'+ '</tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr>'+ '<td colspan="2" height="50"></td>'+ '</tr>'+ '</table>'; this.boxParent = (typeof(parent)=="object")?parent:$(parent); this.boxPage = ''; this.boxCmd = ''; this.boxStatus = 'none'; this.imgObj = null; this.imageUrl = '../images/them/xwindows.gif'; this.onClose = ''; }, create: function(){ var Obj = document.createElement('div'); Obj.id = this.boxHolder; Obj.style.position = 'absolute'; document.getElementsByTagName('body')[0].appendChild(Obj); $(this.boxHolder).innerHTML = this.boxHtml; this.boxStatus = 'created'; this.imgObj = new xBtn(this.imageUrl); this.imgObj.create(this.boxName+'BtnClose', 390, 1, this.boxObj+'.hide(this);'); }, show: function(page, cmd, obj){ if(typeof(page) != "undefined") this.boxPage = page; if(typeof(cmd) != "undefined") this.boxCmd = cmd; if(typeof(obj) != "undefined") this.boxParent = (typeof(obj) == "object")?obj:$(obj); if(this.boxStatus == 'none') this.create(); $(this.boxHolder).style.zIndex = 11; $(this.boxHolder).style.width = this.boxWidth+"px"; this.loading(); this.fetch(page); var sw = document.getElementsByTagName("body")[0].clientWidth || screen.width; var sl = Math.round((sw - this.boxWidth )/2); sl = (xFindPosX(this.boxParent)+10)||sl; if((sl*1 + this.boxWidth*1)> sw) sl = sw - this.boxWidth - 50; st = 50+document.documentElement.scrollTop-0; $(this.boxHolder).style.top = (xFindPosY(this.boxParent)+5||st) + 'px'; $(this.boxHolder).style.left = sl + 'px'; xMakeVisible(this.boxHolder); this.boxStatus = 'visible'; }, reshow: function(){ if(this.boxStatus == 'none') this.show(); xMakeVisible(this.boxHolder); this.boxStatus = 'visible'; try{ eval(this.onOpen); }catch(e){} }, hide: function(){ if(this.boxStatus == 'none') return; xMakeHidden(this.boxHolder); this.boxStatus = 'hidden'; try{ eval(this.onClose); }catch(e){} }, loading: function(){ $(this.boxName+"Cont").innerHTML = this.loadingHtml; }, fetch: function(){ getContent(this.boxMainPage, 'section=guest&module='+this.boxPage+'&'+this.boxCmd+'&'+Math.round(), '$("'+this.boxName+'Cont").innerHTML = Contents;', '', 'GET' ); } }); var xpopupImg = new Class({ initialize: function(name, Obj, width, parent){ this.boxName = name; this.boxObj = Obj; this.boxHolder = "popupBoxHolder"+name; this.boxWidth = (width||550) + 62; this.boxHtml = '<table border="0" cellpadding="0" cellspacing="0" width="100%">'+ '<tr>'+ '<td style="background:url(../images/them/xwindows.gif) left -305px; width:15px; height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) repeat 0px -365px ;height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) left -320px; width:15px; height:15px"></td>'+ '</tr>'+ '<tr>'+ '<td style="width:15px;background:url(../images/them/xwindowsBG.gif) repeat"></td>'+ '<td style="background:#DADADA; padding:5px;">'+ '<div class="whiteBoxHolder" style="text-align:left; padding:0;width:100%;">'+ '<div class="BoxHeader"><div></div></div>'+ '<div class="BoxContent" style="padding:0px 4px 4px;text-align:right;">'+ '<img src="../images/blank.gif" id="'+this.boxName+'BtnClose" width="18" height="18" alt="" border="0" />'+ '</div>'+ '<div class="BoxLine"></div>'+ '<div class="BoxContent" style="padding:5px 11px;" id="'+this.boxName+'Cont">'+ '</div>'+ '<div class="BoxFooter"><div></div></div>'+ '</div>'+ '</td>'+ '<td style="width:15px;background:url(../images/them/xwindowsBG.gif) repeat"></td>'+ '</tr>'+ '<tr>'+ '<td style="background:url(../images/them/xwindows.gif) left -335px; width:15px; height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) repeat 0px -365px ;height:15px"></td>'+ '<td style="background:url(../images/them/xwindows.gif) left -350px; width:15px; height:15px"></td>'+ '</tr>'+ '</table>'; this.loadingHtml = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr>'+ '<td colspan="2" height="50"></td>'+ '</tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr>'+ '<td colspan="2" height="50"></td>'+ '</tr>'+ '</table>'; this.boxParent = (typeof(parent)=="object")?parent:$(parent); this.bottomUrl = ''; this.boxStatus = 'none'; this.imgObj = null; this.imageUrl = '../images/them/xwindows.gif'; this.imgLoad = ''; }, create: function(){ var Obj = document.createElement('div'); Obj.id = this.boxHolder; Obj.style.position = 'absolute'; document.getElementsByTagName('body')[0].appendChild(Obj); $(this.boxHolder).innerHTML = this.boxHtml; this.boxStatus = 'created'; this.imgObj = new xBtn(this.imageUrl); this.imgObj.create(this.boxName+'BtnClose', 390, 1, this.boxObj+'.hide(this);'); }, show: function(){ if(this.boxStatus == 'none') this.create(); $(this.boxHolder).style.zIndex = 11; $(this.boxHolder).style.width = this.boxWidth+"px"; var sw = document.getElementsByTagName("body")[0].clientWidth || screen.width; var sl = Math.round((sw - this.boxWidth )/2); st = 50+document.documentElement.scrollTop-0; $(this.boxHolder).style.top = (xFindPosY(this.boxParent)+5||st) + 'px'; $(this.boxHolder).style.left = sl + 'px'; xMakeVisible(this.boxHolder); this.boxStatus = 'visible'; }, hide: function(){ if(this.boxStatus == 'none') return; xMakeHidden(this.boxHolder); this.boxStatus = 'hidden'; }, loading: function(){ $(this.boxName+"ImgBotHtml").innerHTML = this.loadingHtml; }, fetch: function(){ getContent(this.bottomUrl, '&'+Math.round(), '$("'+this.boxName+'ImgBotHtml").innerHTML = Contents;', '', 'GET' ); }, enlarge: function(xobj, ximg, xwidth, xbottomUrl, needNavigate){ if(typeof(needNavigate) == "undefined") needNavigate = false; if(typeof(xwidth) != "undefined") this.boxWidth = xwidth*1+62; this.boxParent = (typeof(xobj) != "object")?$(xobj):xobj; var imgSrc = ximg; if(this.boxStatus != 'visible') this.show(); var img = ximg; var IMGloading = (this.imgLoad == '' || !needNavigate)?'':'onload="try{'+this.imgLoad+'}catch(e){}"'; $(this.boxName + "Cont").innerHTML = '<center class="loading">'+ '<img border="0" id="'+this.boxName+'MainPic" src="'+imgSrc+'" alt="" border"0" usemap="#'+this.boxName+'Map" '+IMGloading+' />'+ '<div id="'+this.boxName+'PicBot">'+ '<map name="'+this.boxName+'Map" id="'+this.boxName+'Map">'+ '<area shape="rect" coords="0,0,0,0" href="#1" />'+ '<area shape="rect" coords="0,0,0,0" href="#2" />'+ '</map><br /><br /></div>'+ '<div id="'+this.boxName+'ImgBotHtml"></div>'+ '</center>'; if(typeof(xbottomUrl) != "undefined"){ this.bottomUrl = xbottomUrl; this.loading(); this.fetch(); } } }); var xcomboBox = new Class({ initialize: function(name, selObj, Obj, width){ this.comboObj = Obj; this.comboId = name; this.comboName = name; this.comboWidth = width||200; this.comboHeight = 23; this.comboSelObj = (typeof(selObj) != "object")?$(selObj):selObj; this.comboListHeight = '200'; this.comboStatus = 'none'; this.comboOnchange = ''; this.listValue = Array(); this.listText = Array(); this.listSelect = Array(); this.comboBgImage = ''; this.comboListBgColor = this.comboListBgColor||'#FFFFFF'; this.comboBgColor = this.comboBgColor||'transparent '; this.comboStyle = this.comboStyle||';text-align:right;'; this.comboItemClass = 'xComboBox'; this.comboBtn = ''; this.lastSelected = ''; this.readOnly = ' readonly="readonly"'; this.changeOnCreate = true; }, create: function(comboArray, selectedValue){ if(this.comboStatus != 'none' && typeof(comboArray) == 'undefined') return; if(typeof(comboArray) != 'undefined'){ this.fetchArray(comboArray, selectedValue); this.fill(); return; } this.fetch(); var HTML11 ='<div style="padding:0;margin:0;background:'+this.comboBgColor+' url('+this.comboBgImage+') no-repeat scroll left; height:'+this.comboHeight+'px;width:'+this.comboWidth+'px" onclick="'+this.comboObj+'.togle();">'+ '<input '+this.readOnly+' type="text" name="'+this.comboId+'Cap" id="'+this.comboId+'Cap" value="" style="font-family:Tahoma, Verdana, arial;font-size:12px;padding:0 2px 0 0;border:0; margin:2px 0;width:'+(this.comboWidth-2)+'px;background:'+this.comboBgColor+' url('+this.comboBgImage+') no-repeat scroll left;'+this.comboStyle+'" />'+ '<input type="hidden" name="'+this.comboName+'" id="'+this.comboId+'" />'+ '</div>'; var HTML2 = '<div id="'+this.comboId+'ListCont" style="position:relative;"><div style=" background:'+this.comboListBgColor+'; border:1px solid #AAAAAA;padding:3px;width:'+this.comboWidth+'px;display:none;overflow:visible;position:absolute;left:'; if(navigator.userAgent.indexOf('MSIE 6.') == -1 && navigator.userAgent.indexOf('MSIE 5.') == -1) HTML2 = HTML2 + '-3px" id="'+this.comboId+'List"></div></div>'; else HTML2 = HTML2 + '-'+ this.comboWidth +'px" id="'+this.comboId+'List"></div></div>'; if(this.comboSelObj.tagName == "SELECT") this.comboSelObj.parentNode.innerHTML = HTML11 + HTML2; else this.comboSelObj.innerHTML = HTML11 + HTML2; this.fill(); this.comboStatus = 'close'; if(this.comboBtn){ if(typeof(this.comboBtn) != 'object') this.comboBtn = $(this.comboBtn); var CMD = this.comboObj+'.togle();'; this.comboBtn.style.cursor = 'pointer'; this.comboBtn.onclick = function(){ eval(CMD); }; } }, fetch: function(){ if(this.comboSelObj == null) return; try{ if(this.comboSelObj.style.height) this.comboListHeight = this.comboSelObj.style.height.toUpperCase().split("PX")[0] || this.comboListHeight; }catch(e){} for(var i=0; i<this.comboSelObj.length; i++){ this.listValue.push(this.comboSelObj[i].value||'0'); this.listText.push(this.comboSelObj[i].text||'&nbsp;'); this.listSelect.push(this.comboSelObj[i].selected); } }, fill: function(){ var itemList = ''; for(k in this.listText){ if(typeof(this.listText[k]) == 'function' || typeof(this.listText[k]) == 'object') continue; if(this.listSelect[k]){ this.select(k); } itemList = itemList + "<a href=\"javascript:"+this.comboObj+".select("+k+");\" class='"+this.comboItemClass+"'>"+this.listText[k]+"</a>"; } $(this.comboId+'List').innerHTML = itemList; $(this.comboId+"List").style.height = this.comboListHeight+"px"; }, fetchArray: function(comboArray, selectedValue){ this.listValue = Array(); this.listText = Array(); this.listSelect = Array(); for(Key in comboArray){ try{ if(typeof(comboArray[Key]) == 'function' || typeof(comboArray[Key]) == 'object') continue; this.listValue.push(Key); this.listText.push(comboArray[Key]); if(selectedValue=='first') selectedValue=comboArray[Key]; this.listSelect.push(comboArray[Key]==selectedValue); }catch(e){} } }, select: function(k, doOnChange){ if(typeof(doOnChange)!= "undefined"){ nk = -987; for(Key in this.listValue) if(this.listValue[Key] == k){ nk = Key; break; } if(nk == -987) return; k = nk; }else{ doOnChange = true; } $(this.comboId+'Cap').value = (this.listText[k] == '&nbsp;')?' ':this.listText[k]; $(this.comboId).value = this.listValue[k]||this.listText[k]; if(this.lastSelected != $(this.comboId).value){ this.lastSelected = $(this.comboId).value; try{ if(doOnChange && (this.changeOnCreate || this.comboStatus != 'none')) setTimeout(this.comboOnchange, 1); }catch(e){} } }, open: function(){ if(this.comboStatus == 'open') return; if($(this.comboId+"List").style.overflow == "visible"){ $(this.comboId+"List").style.overflow = "auto"; if($(this.comboId+"List").clientHeight > 200){ $(this.comboId+"List").style.height = this.comboListHeight+"px"; if(browser != "msie") $(this.comboId+"List").style.width = ($(this.comboId+"List").clientWidth*1+28) +"px"; else $(this.comboId+"List").style.width = ($(this.comboId+"List").clientWidth*1+10) +"px"; } } xMakeVisible(this.comboId+"List"); this.comboStatus = 'open'; setTimeout('document.getElementsByTagName("body")[0].onclick = function(){'+this.comboObj+'.close();};', 100); }, close: function(){ xMakeHidden(this.comboId+"List"); document.getElementsByTagName("body")[0].onclick = function(){ }; this.comboStatus = 'close'; }, togle: function(){ if(this.comboStatus == 'open') this.close(); else this.open(); }, truncate: function(){ this.create(Array()); $(this.comboId+'Cap').value = ''; $(this.comboId).value = ''; } }); var xpagingBtn= new Class({ initialize: function(name, parent, OBJ){ this.obj = OBJ; this.parent = (typeof(parent) == 'object')?parent:$(parent); this.name = name; this.curPos = 1; this.lastPos = 1; this.maxPos = 1; this.islock = false; this.preClass = 'preBtn'; this.nextClass = 'nextBtn'; this.dotClass = 'dotBtn'; this.btnHtml = ''; this.onchange = ''; }, updateHtml: function(){ this.btnHtml = ''; for(i=this.maxPos;i>0;i--) this.btnHtml += '<a id="'+this.name+'_dot'+i+'" class="'+this.dotClass+'" href="javascript:'+this.obj+'.go('+i+')">&nbsp;</a>'; this.btnHtml = '<a id="'+this.name+'_next" class="'+this.nextClass+'Dis" href="javascript:'+this.obj+'.next()">&nbsp;</a>'+ this.btnHtml+ '<a id="'+this.name+'_pre" class="'+this.preClass+'Dis" href="javascript:'+this.obj+'.pre()">&nbsp;</a>'; return this.btnHtml; }, create: function(){ this.parent.innerHTML = this.updateHtml(); this.update(); }, update: function(){ for(i=1;i<=this.maxPos;i++) $(this.name+'_dot'+i).className = this.dotClass; $(this.name+'_dot'+this.curPos).className = this.dotClass+'On'; if(this.curPos > 1) $(this.name+'_pre').className = this.preClass; else $(this.name+'_pre').className = this.preClass + 'Dis'; if(this.curPos < this.maxPos) $(this.name+'_next').className = this.nextClass; else $(this.name+'_next').className = this.nextClass + 'Dis'; }, go: function(where){ if(this.islock) return; if(where!= this.curPos && where>0 && where<=this.maxPos){ this.lastPos = this.curPos; this.curPos = where; this.update(); try{ eval(this.onchange); }catch(e){} } }, next: function(xforce){ var force = (typeof(xforce) == "undefined")?false:xforce; if(this.curPos<this.maxPos) this.go(this.curPos*1+1); else if(force) this.go(1); }, pre: function(xforce){ var force = (typeof(xforce) == "undefined")?false:xforce; if(this.curPos>1) this.go(this.curPos*1-1); else if(force) this.go(this.maxPos); }, lock: function(){ this.islock = true; }, unlock: function(){ this.islock = false; } }); var xBtn = new Class({ initialize: function(img){ this.img = img; this.blankImg = "../images/blank.gif"; }, create: function(xobj, xtopPos, xhaveDown, xcmd){ var topPos = (typeof(xtopPos) == "undefined")?0:xtopPos; var haveDown = (typeof(xhaveDown) == "undefined")?true:xhaveDown; var obj = (typeof(xobj) != "object")?$(xobj):xobj; var width = obj.clientWidth || obj.width || 50; var height = obj.clientHeight || obj.height || 22; var normal = "transparent url("+this.img+") no-repeat 0px -"+ topPos +"px"; var over = "transparent url("+this.img+") no-repeat 0px -"+ (topPos*1+height*1) +"px"; var down = over; if(haveDown) down = "transparent url("+this.img+") no-repeat 0px -"+ (topPos*1+height*2) +"px"; var cmd = (typeof(xcmd) == "undefined")?'':xcmd; this.makebtn(obj, normal, over, down, cmd); }, show: function(xobj, xtopPos){ var topPos = (typeof(xtopPos) == "undefined")?0:xtopPos; var obj = (typeof(xobj) != "object")?$(xobj):xobj; var normal = "transparent url("+this.img+") no-repeat 0px -"+ topPos +"px"; this.makeimg(obj, normal); }, makebtn: function(obj, normal, over, down, cmd){ obj.onmouseover = function(){ obj.style.background = over; }; obj.onmouseout = function(){ obj.style.background = normal; }; obj.onmouseup = function(){ obj.style.background = over; }; obj.onmousedown = function(){ obj.style.background = down; }; if(typeof(cmd) != "undefined") obj.onclick = function(){ try{ eval(cmd); }catch(e){} }; obj.onload = function(){; }; obj.ondblclick = function(){ }; obj.src = this.blankImg; obj.style.background = normal; obj.style.cursor = "pointer"; }, makeimg: function(obj, normal){ obj.onmouseover = function(){ }; obj.onmouseout = function(){ }; obj.onmouseup = function(){ }; obj.onmousedown = function(){ }; obj.onclick = function(){ }; obj.onload = function(){ }; obj.ondblclick = function(){ }; obj.src = this.blankImg; obj.style.background = normal; obj.style.cursor = "auto"; }}); ;function xHintMaker() { try{ xloadImages( "../images/hintBot.gif", "../images/hintBotLeft.gif", "../images/hintBotRight.gif", "../images/hintBotSmallRight.gif", "../images/hintLeft.gif", "../images/hintPointer.gif", "../images/hintRight.gif", "../images/hintTop.gif", "../images/hintTopRight.gif", "../images/hintTopLeft.gif", "../images/hintCloseBtn.gif" ); } catch(e){} } function xHintCreate(langDir,autoClose) { langDir=(langDir.toLowerCase()=="ltr" && langDir.length > 0)?"ltr":"rtl"; if(!$("winHintBox")){ var wn=document.createElement('div'); wn.id='winHintBox'; document.getElementsByTagName('body')[0].appendChild(wn); } else wn=$("winHintBox"); wn.style.zIndex=100; wn.style.visibility="hidden"; wn.style.display="inline"; wn.style.position="absolute"; Html='<table border="0" cellpadding="0" cellspacing="0" id="winHintBoxMain">'+ '<tr>'+ '<td><img border="0" src="../images/hintTopLeft.gif" width="7" height="7" alt=""/></td>'+ '<td colspan="3" style="background-image:url(../images/hintTop.gif);background-repeat:repeat-x;background-position:top;width:100%;"></td>'+ '<td><img border="0" src="../images/hintTopRight.gif" width="7" height="7" alt=""/></td>'+ '</tr>'+ '<tr>'+ '<td style="background-image:url(../images/hintLeft.gif);background-repeat:repeat-y;background-position:left;width:7px"></td>'+ '<td colspan="3" style="background-color:#FFFFE1;width:100%;height:100%;">'+ '<table border="0" cellpadding="0" cellspacing="0" style="width:100%;height:100%;direction:'+langDir+'">'+ '<tr>'+ '<td><img src="../images/blank.gif" width="17" height="17" id="winHintBoxIcon"/></td>'+ '<td><img src="../images/blank.gif" width="2" height="1"/></td>'+ '<td id="winHintBoxTitle" style="font-family:Tahoma,Verdana,Arial;font-size:10px;color:#333333;width:100%;font-weight:bold">---</td>'+ '<td>';if(autoClose !==true)Html+='<img border="0" src="../images/hintCloseBtn.gif" alt="بستن" onload="xBtnCreate(this,\'xHintClose();\')" width="17" height="17"/>';Html+='</td>'+ '</tr>'+ '<tr>'+ '<td colspan="4"><img src="../images/blank.gif" width="1" height="5" alt=""/></td>'+ '</tr>'+ '<tr>'+ '<td style="font-family:Tahoma,Verdana,Arial;font-size:12px;color:#666666;height:100%;text-align:justify;" colspan="4" height="100%" id="winHintBoxMsg">پيام</td>'+ '</tr>'+ '<tr>'+ '<td colspan="4"><img src="../images/blank.gif" width="1" height="5" alt=""/></td>'+ '</tr>'+ '</table>'+ '</td>'+ '<td style="background-image:url(../images/hintRight.gif);background-repeat:repeat-y;background-position:left;width:7px"></td>'+ '</tr>'+ '<tr>'+ '<td style="vertical-align:top"><img border="0" src="../images/hintBotLeft.gif" width="7" height="7" alt=""/></td>'+ '<td style="vertical-align:top;background-image:url(../images/hintBot.gif);background-repeat:repeat-x;background-position:top;width:100%"></td>'+ '<td style="vertical-align:top"><img border="0" src="../images/hintPointer.gif" width="20" height="26" alt=""/></td>'+ '<td style="vertical-align:top"><img border="0" src="../images/hintBotSmallRight.gif" width="9" height="7" alt=""/></td>'+ '<td style="vertical-align:top"><img border="0" src="../images/hintBotRight.gif" width="7" height="7" alt=""/></td>'+ '</tr>'+ '</table>'; wn.innerHTML=Html; } function xHint(obj,msg,title,icon,cwidth,langDir,autoClose) { try{ if(typeof(obj)!="object")obj=$(obj); } catch(e){} if(typeof(autoClose)=="undefined") autoClose=true; if(autoClose===true){ obj.onmouseout=function(){ xHintCloseDue(1); }; } document.body.onmousedown=function(){xHintCloseDue(1);}; if(typeof(langDir)=="undefined") langDir="rtl"; xHintCreate(langDir,autoClose); $("winHintBoxMain").style.width=cwidth+"px"; var hintType={ "information":"hintIconInformation.gif", "error":"hintIconError.gif", "confirm":"hintIconConfirm.gif", "under":"hintIiconUnderConstruction.gif", "warning":"hintIconWarning.gif" }; $("winHintBoxMsg").innerHTML=msg.replace(/\n/g,"<br>"); $("winHintBoxTitle").innerHTML=(typeof(title)!="undefined" && title.length > 0)?title:''; if(typeof(icon)!="undefined" && icon.length > 0){ _xloadImages("../images/"+hintType[icon.toLowerCase()]); $("winHintBoxIcon").src="../images/"+hintType[icon.toLowerCase()]; } else $("winHintBoxIcon").src="../images/"+hintType["information"]; var Y=xFindPosY(obj)-$("winHintBox").clientHeight+1; var X=xFindPosX(obj)-$("winHintBox").clientWidth+20+Math.round(obj.clientWidth/2); var fsObj = obj; var ScrTop = 0; var ScrLeft = 0; while (fsObj){ if(fsObj.tagName == 'BODY') break; ScrTop += fsObj.scrollTop; ScrLeft += fsObj.scrollLeft; fsObj = fsObj.parentNode; } $("winHintBox").style.left= (X*1 - ScrLeft*1) + "px"; $("winHintBox").style.top= (Y*1 - ScrTop*1) + "px"; xMakeVisible($("winHintBox")); if(typeof(autoClose)=="number") setTimeout('xHintCloseDue('+autoClose*10+')',100); } function xHintClose() { try{ $("winHintBox").innerHTML=""; xMakeHidden($("winHintBox")); } catch(e){} } function xHintCloseDue(Time) { if($("winHintBox").innerHTML.length < 20) return; if(--Time) setTimeout('xHintCloseDue('+Time+')',100); else xHintClose(); } setTimeout("xHintMaker();",10); ; var hexcase = 0; var b64pad = ""; var chrsz = 8; function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));} function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));} function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));} function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));} function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));} function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));} function xsha1(inp) { return hex_sha1(inp); } function core_sha1(x, len) { x[len >> 5] |= 0x80 << (24 - len % 32); x[((len + 64 >> 9) << 4) + 15] = len; var w = Array(80); var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; var e = -1009589776; for(var i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; var olde = e; for(var j = 0; j < 80; j++) { if(j < 16) w[j] = x[i + j]; else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j))); e = d; d = c; c = rol(b, 30); b = a; a = t; } a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); e = safe_add(e, olde); } return Array(a, b, c, d, e); } function sha1_ft(t, b, c, d) { if(t < 20) return (b & c) | ((~b) & d); if(t < 40) return b ^ c ^ d; if(t < 60) return (b & c) | (b & d) | (c & d); return b ^ c ^ d; } function sha1_kt(t) { return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514; } function core_hmac_sha1(key, data) { var bkey = str2binb(key); if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz); var ipad = Array(16), opad = Array(16); for(var i = 0; i < 16; i++) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; } var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz); return core_sha1(opad.concat(hash), 512 + 160); } function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); } function rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); } function str2binb(str) { var bin = Array(); var mask = (1 << chrsz) - 1; for(var i = 0; i < str.length * chrsz; i += chrsz) bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32); return bin; } function binb2str(bin) { var str = ""; var mask = (1 << chrsz) - 1; for(var i = 0; i < bin.length * 32; i += chrsz) str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask); return str; } function binb2hex(binarray) { var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for(var i = 0; i < binarray.length * 4; i++) { str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); } return str; } function binb2b64(binarray) { var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var str = ""; for(var i = 0; i < binarray.length * 4; i += 3) { var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16) | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 ) | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF); for(var j = 0; j < 4; j++) { if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); } } return str; }; if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;;﻿ var runAtHtmlLoad = Array(); var runAtPageLoad = Array(); var runAtScriptLoad = Array(); function loadTrigger(where) { switch(where){ case 'html': while(runAtHtmlLoad.length > 0) try{ eval(runAtHtmlLoad.pop()); } catch(e){alert(e);} break; case 'page': while(runAtPageLoad.length > 0) try{ eval(runAtPageLoad.pop()); } catch(e){alert(e);} break; case 'javascript': while(runAtScriptLoad.length > 0) try{ eval(runAtScriptLoad.pop()); } catch(e){alert(e);} break; } } var longDigitText = { 1: "اول", 2: "دوم", 3: "سوم", 4: "چهارم", 5: "پنجم", 6: "ششم", 7: "هفتم", 8: "هشتم", 9: "نهم", 10: "دهم", 11: "يازدهم", 12: "دوازدهم", 13: "سيزدهم", 14: "چهاردهم", 15: "پانزدهم", 16: "شانزدهم", 17: "هفدهم", 18: "هجدهم", 19: "نوزدهم", 20: "بيستم", 21: "بيست و يکم", 22: "بيست و دوم", 23: "بيست و سوم", 24: "بيست و چهارم", 25: "بيست و پنجم", 26: "بيست و ششم", 27: "بيست و هفتم", 28: "بيست و هشتم", 29: "بيست و نهم", 30: "سی ام", 31: "سی و يکم", 32: "سی و دوم", 33: "سی و سوم", 34: "سی و چهارم" }; function leftResWeekChange(w) { try{ for(var i=1;i<40;i++) try{ xMakeHidden("leftResW"+i); } catch(e){alert(e);} if($("leftResW"+w)) xMakeVisible($("leftResW"+w)); else{ var Obj = document.createElement('div'); Obj.id = "leftResW"+w; Obj.style.overflow = "hidden"; Obj.innerHTML = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /><br /><br /><br /></td></tr>'+ '</table>'; $("leftResWCont").appendChild(Obj); xMakeVisible($("leftResW"+w)); getContent('../global/index.php', 'section=guest&module=objects&cmd=leagueRes&week='+w, '$("leftResW'+w+'").innerHTML = Contents;', '', 'GET'); } } catch(e){alert(e);} } function leftProgWeekChange(w) { if($("leagueProgTable")){ try{ if(typeof(w) == "undefined"){ var w = $("leagueProgTable").value; for(var i=1;i<35;i++) try{ if($("leftProgW"+i)) xMakeHidden("leftProgW"+i); } catch(e){ break; } xMakeVisible($("leftProgW"+w)); } } catch(e){alert(e);} }else setTimeout("leftProgWeekChange("+w+");", 500); } function leagueTable(w) { if(!$("leagueTableHolder")){ setTimeout('leagueTable("'+w+'");', 100); return; } if(typeof(w) == "undefined") var w = $("leagueTableWeek").value; leagueTableLoading= '<center>'+ '<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />'+ '<img align="absmiddle" src="../images/them/loading.gif" width="16" height="16" alt="" />'+ 'درحال بارگذاری'+ '<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />'+ '</center>'; for(var i=1;i<35;i++) try{ if($("leagueTableW"+i)) xMakeHidden("leagueTableW"+i); } catch(e){} if($("leagueTableW"+w)){ xMakeVisible($("leagueTableW"+w)); $("leagueTableComment").innerHTML = "آمار جدول مربط به نتايج بازی‌های انجام گرفته ليگ تا پايان هفته "+longDigitText[w]+" می‌باشد."; }else{ $("leagueTableComment").innerHTML = "جدول ليگ در حال بروزرسانی می‌باشد، لطفاً صبر کنيد."; var Obj = document.createElement('div'); Obj.id = "leagueTableW"+w; Obj.style.width = "582px"; Obj.style.overflow = "hidden"; Obj.innerHTML = leagueTableLoading; $("leagueTableHolder").appendChild(Obj); xMakeVisible($("leagueTableW"+w)); getContent('../global/index.php', 'section=guest&module=objects&cmd=leagueTable&week=' + w, '$("leagueTableW'+w+'").innerHTML = Contents;'+ '$("leagueTableComment").innerHTML = "آمار جدول مربط به نتايج بازی‌های انجام گرفته ليگ تا پايان هفته \''+longDigitText[w]+'\' می‌باشد."', '', 'GET'); } } function printNews() { w=800; h=600; pageScroll = "yes"; LeftPosition = screen.width ? (screen.width - w) / 2 : 0; TopPosition = screen.height ? (screen.height - h) / 2 : 0; var pageConfig = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=" + pageScroll + ", resizable=yes, width=" + (w + 18) + ", height=" + (h + 18) + ", left=" + LeftPosition + ", top=" + TopPosition; var printW = window.open(null, "print", pageConfig); var printNews = "<html><head><link type='text/css' rel='stylesheet' href='../+style/print.css'><title>News :: Print Preview</title></head><body>"+ "<div style='height:85px'><div class='printhidden'><a href='javascript:window.print();'>چاپ خبر <img src='../images/them/icocPrint.gif' height='24' width='24' alt='چاپ خبر' hspace='4' align='absmiddle' border='0' /></a></div>"+ "<img style='float:right' src='../images/them/logo-200x75.gif' width='200' height='75' alt='' align='right' /></div>"+ "<div class='printTitle'>"+$("newsDetailTitle").innerHTML+"</div>"+ "<div class='printBody'>"+$("newsDetailImg").innerHTML+$("newsDetailBody").innerHTML+"</div>"+ "</body></html>"; printW.document.write(printNews); printW.document.close(); printW.focus(); } function printDiv(obj) { if(typeof(obj) != "object") obj = $(obj); if(!obj) return false; w=obj.clientWidth||800; h=obj.clientHeight||600; if(h > screen.height) h = Math.round(screen.height/3*2); pageScroll = "yes"; LeftPosition = screen.width ? (screen.width - w) / 2 : 0; TopPosition = screen.height ? (screen.height - h) / 2 : 0; var pageConfig = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=" + pageScroll + ", resizable=yes, width=" + (w + 18) + ", height=" + (h + 18) + ", left=" + LeftPosition + ", top=" + TopPosition; var printW = window.open(null, "printWin", pageConfig); var printNews = "<html><head>" + document.head.innerHTML + "<link type='text/css' rel='stylesheet' media='print' href='../+style/print.css'>"+ "<style type='text/css'>.hideitlater{display:none;}</style>"+ "</head><body style='background:#FFFFFF'>" + "<div style='height:85px'><div class='printhidden'><a href='javascript:window.print();'>"+ "چاپ مطلب<img src='../images/them/icocPrint.gif' height='24' width='24' alt='چاپ مطلب' hspace='4' align='absmiddle' border='0' />"+ "</a></div>"+ obj.innerHTML + "</body></html>"; printW.document.write(printNews); printW.document.close(); printW.focus(); } function printTable() { w=800; h=600; pageScroll = "yes"; LeftPosition = screen.width ? (screen.width - w) / 2 : 0; TopPosition = screen.height ? (screen.height - h) / 2 : 0; var pageConfig = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=" + pageScroll + ", resizable=yes, width=" + (w + 18) + ", height=" + (h + 18) + ", left=" + LeftPosition + ", top=" + TopPosition; var printW = window.open(null, "print", pageConfig); var printNews = "<html><head><link type='text/css' rel='stylesheet' href='../+style/print.css'><title>League Table :: Print Preview</title></head><body>"+ $('leagueTableMainHolder').innerHTML+ "</body></html>"; printW.document.write(printNews); printW.document.close(); printW.focus(); } function vote(cmd) { if(cmd != "send" && cmd != "result") return; var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '</table>'; var res = ''; if(cmd == 'send'){ for(i=1;i<5;i++) try{ res +=($("vote_i"+i).checked)?i+',':''; }catch(e){} if(res == ''){ xMakeVisible("voteAnswer"); xMakeHidden("voteAnswerCode"); xHint($("vote_i1"), 'لطفاً يکی از گزينه ها را با کليک کردن روی جواب آن انتحاب نمائيد', 'خطا در ارسال', 'error', 250, 'rtl', 15); return; } if($("voteCode").value.match(/\d{4}/) != $("voteCode").value || $("voteCode").value == ""){ xMakeHidden("voteAnswer"); xMakeVisible("voteAnswerCode"); xHint($("voteCode"), 'لطفاً جهت ثبت نظر خود کد امنيتی را وارد کنيد', 'کد امنيتی', 'information', 250, 'rtl', 15); $("voteCode").focus(); return; } } var FormCont = createQuery($("voteForm")); $("voteContainer").innerHTML = loading; xHintClose(); getContent('../global/index.php', 'section=guest&module=objects&cmd=voteSend&'+FormCont+'&res='+res+'&_r_'+Math.random(), '$("voteContainer").innerHTML = Contents;', '', 'POST'); } function sendPic() { var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '</table>'; var emailFormat = /^[\w-_\.]+@[\w-]+\.[\w]+(\.\w+)?$/; if(!emailFormat.test($("picsendMailEmail").value)){ xHint($("picsendMailEmail"), 'لطفاً ايميل گيرنده را بطور صحيح وارد نمائيد', 'اشکال در آدرس گيرنده', 'error', 200, 'rtl', 7); $("picsendMailEmail").focus(); return; } var FormCont = createQuery($("ImagetellFriend")); $("sendPicMainHolder").innerHTML = loading; getContent('../global/index.php', 'section=guest&module=objects&cmd=imageOptionSend&'+FormCont+'&_r_'+Math.random(), '$("sendPicMainHolder").innerHTML = Contents;', '', 'POST'); } function reviewSend() { var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /><br /><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /><br /><br /><br /><br /></td></tr>'+ '</table>'; if($("reviewMsgBody").value.length < 5){ xHint($("reviewMsgBody"), 'لطفاً نظر خود را بنويسيد.', 'نظر وارد نشده', 'error', 200, 'rtl', 5); $("reviewMsgBody").focus(); return; } var FormCont = createQuery($("reviewForm")); $("reviwHolder").innerHTML = loading; getContent('../global/index.php', 'section=guest&module=objects&cmd=reviewSend&'+FormCont+'&_r_'+Math.random(), '$("reviwHolder").innerHTML = Contents;', '', 'POST'); } function forgotPassword() { var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /><br /><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /><br /><br /><br /><br /></td></tr>'+ '</table>'; var tForm = $("loginForgot"); var emailFormat = /^[\w-_\.]+@[\w-]+\.[\w]+(\.\w+)?$/; if(!emailFormat.test(tForm.useremail.value) && tForm.useremail.value.length > 0){ xHint(tForm.useremail, 'ايميل خود را لطفاً بصورت صحيح وارد نمائيد.', 'ايميل صحيح نيست', 'error', 250, 'rtl', 5); tForm.useremail.focus(); return; } if(!emailFormat.test(tForm.useremail.value) && tForm.username.value.length <4){ xHint(tForm.username, 'لطفاً يکی از فيلدهای نام کاربری و يا ايميل را بصورت صحيح تکميل نمائيد.', 'اطلاعات صحيح نيست', 'error', 250, 'rtl', 5); tForm.username.focus(); return; } if(tForm.usercode.value.match(/\d{4}/) != tForm.usercode.value || tForm.usercode.value == ""){ xHint(tForm.usercode, 'لطفاً کد امنيتی را بصورت صحيح وارد نمائيد. اين کد يک عدد چهار رقمی است.\nدرصورتيکه کد موجود خوانا نيست روی آن دوبار کليک (Double Click) کرده و سپس کد جديد را وارد نمائيد.', 'اشکال در کد امنيتی', 'error', 250, 'rtl', 10); tForm.usercode.focus(); return; } var FormCont = createQuery(tForm); $("forgotPassHolder").innerHTML = loading; xHintClose(); getContent('../global/index.php', 'section=guest&module=objects&cmd=loginForgotSend&'+FormCont+'&_r_'+Math.random(), '$("forgotPassHolder").innerHTML = Contents;', '', 'POST'); } function loginSubmit(st) { var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /></td></tr>'+ '</table>'; if(st == null) st = 1; var tForm = $("loginForm"); if(!st){ xHintClose(); $('loginBoxStatus').innerHTML = 'درحال بررسی ...'; $("loginFormContainer").innerHTML = loading; getContent('../global/index.php', 'section=guest&module=objects&cmd=loginCheck&_r_'+Math.random(), '$("loginFormContainer").innerHTML = Contents;', 'loginSubmit(0);', 'POST'); } if(tForm.loginUsername.value.length <2){ xHint(tForm.loginUsername, 'لطفاً نام کاربری خود را وارد نمائيد', 'نام کاربری', 'error', 200, 'rtl', 5); tForm.loginUsername.focus(); return; } if(tForm.loginPassword.value.length <2){ xHint(tForm.loginPassword, 'کلمه عبور خود را وارد نمائيدو توجه داشته باشيد که کلمه عبور شما نسبت به کوچک يا بزرگ بودن حروف حساس است. (case sensitive)', 'کلمه عبور', 'error', 200, 'rtl', 5); tForm.loginPassword.focus(); return; } try{ if(tForm.loginCode.value.match(/\d{4}/) != tForm.loginCode.value || tForm.loginCode.value == ""){ xHint(tForm.loginCode, 'لطفاً کد امنيتی را بصورت صحيح وارد نمائيد. اين کد يک عدد چهار رقمی است.\nدرصورتيکه کد موجود خوانا نيست روی آن دوبار کليک (Double Click) کرده و سپس کد جديد را وارد نمائيد.', 'اشکال در کد امنيتی', 'error', 250, 'rtl', 10); tForm.loginCode.focus(); return; } }catch(e){}; xHintClose(); $('loginBoxStatus').innerHTML = 'درحال بررسی ...'; var FormCont = createQuery(tForm); $("loginFormContainer").innerHTML = loading; getContent('../global/index.php', 'section=guest&module=objects&cmd=loginFormSend&'+FormCont+'&_r_'+Math.random(), '$("loginFormContainer").innerHTML = Contents;', '', 'POST'); } function logoutSubmit() { var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /></td></tr>'+ '</table>'; $("loginFormContainer").innerHTML = loading; xMakeHidden("loginStatus"); getContent('../global/index.php', 'section=guest&module=objects&cmd=logoutSend&location='+document.location.href+'&_r_'+Math.random(), '$("loginFormContainer").innerHTML = Contents;'+ 'xMakeHidden("logoutItems");'+ 'xMakeVisible("loginItems");', '', 'POST'); } function changeCap(obj) { var RAND = Math.floor(Math.random()*99999999); if(typeof(obj) == 'object' && obj.tagName == 'IMG' && obj.src.match(/captcha\d*\.gif/)){ obj.src = '../images/blank.gif'; obj.src = 'captcha'+RAND+'.gif'; return; } for(k in document.images) try{ if(document.images[k].src.match(/captcha\d+\.gif/)){ obj = document.images[k]; obj.src = '../images/blank.gif'; obj.src = 'captcha'+RAND+'.gif'; } }catch(e){} } function mailerSend() { var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /><br /><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /><br /><br /><br /><br /></td></tr>'+ '</table>'; var tForm = $("mailerForm"); var emailFormat = /^[\w-_\.]+@[\w-]+\.[\w]+(\.\w+)?$/; if(!emailFormat.test(tForm.recieverEmail.value)){ xHint(tForm.recieverEmail, 'لطفاً آدرس ايميل گيرنده را در اين قسمت واردنمائيد.', 'ايميل صحيح نيست', 'error', 250, 'rtl', 5); tForm.recieverEmail.focus(); return; } var FormCont = createQuery(tForm); $("mailerHolder").innerHTML = loading; getContent('../global/index.php', 'section=guest&module=objects&cmd=imageoptionSend&'+FormCont+'&_r_'+Math.random(), '$("mailerHolder").innerHTML = Contents;', '', 'POST'); } function signupSend(whiche) { if(typeof(whiche) == "undefined") whiche = 1; var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /><br /><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /><br /><br /><br /><br /></td></tr>'+ '</table>'; var tForm = $("signupForm"); var emailFormat = /^[\w-_\.]+@[\w-]+\.[\w]+(\.\w+)?$/; var userFormat = /^[\w\-]{4,}$/; if(whiche == 1) { if($("usr_xname").value.length < 3){ xHint($("usr_xname"), 'لطفاً نام خود را به فارسی در اين قسمت واردنمائيد.\nنام بايد با حروف فارسی وارد شود و حداقل ۳ حرف باشد', 'نام صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xname").focus(); return; } if($("usr_xfamily").value.length < 3){ xHint($("usr_xfamily"), 'لطفاً نام خانوادگی خود را به فارسی در اين قسمت واردنمائيد.\nنام خانوادگی خود را با حروف فارسی وارد کنيد. حداقل ۳ حرف', 'نام خانوادگی صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xfamily").focus(); return; } if($("usr_xtel").value.length < 8){ xHint($("usr_xtel"), 'لطفاً شماره تلفن خود را در اين قسمت واردنمائيد. کد شهر خود را حتماً وارد نمائيد\nمانند: ۱۲۳۴۵۶۷۸۹-۰۲۱', 'تلفن صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xtel").focus(); return; } if(!emailFormat.test($("usr_xemail").value)){ xHint($("usr_xemail"), 'لطفاً آدرس ايميل خود را در اين قسمت واردنمائيد.', 'ايميل صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xemail").focus(); return; } if($("usr_xstate").value.length < 2){ xHint($("usr_xstate"), 'لطفاً نام استان محل سکونت خود را در اين قسمت واردنمائيد.', 'نام استان صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xstate").focus(); return; } if($("usr_xcity").value.length < 2){ xHint($("usr_xcity"), 'لطفاً نام شهر محل اقامت خود را در اين قسمت واردنمائيد.', 'نام شهر صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xcity").focus(); return; } if($("usr_xaddress").value.length < 10){ xHint($("usr_xaddress"), 'لطفاً آدرس خود را در اين قسمت واردنمائيد.\n', 'آدرس صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xaddress").focus(); return; } } if(!userFormat.test($("usr_xusername").value)){ xHint($("usr_xusername"), 'لطفاً نام کاربری دلخواه خود را در اين قسمت واردنمائيد.\nنام کاربری بايد متشکل از حروف انگليسی و اعداد و حداقل 4 حرف باشد', 'نام کاربری صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xusername").focus(); return; } if($("usr_xpassword").value.length < 4){ xHint($("usr_xpassword"), 'لطفاً کلمه عبور خود را در اين قسمت واردنمائيد.\nکلمه عبور حداقل بايد 4 حرفی باشد', 'کلمه عبور صحيح نيست', 'error', 250, 'rtl', 5); $("usr_xpassword").focus(); return; } if($("usr_xpassword").value != tForm.usr_pass2.value){ xHint(tForm.usr_pass2, 'لطفاً کلمه عبور خود را مجدداً در اين قسمت واردنمائيد.', 'تکرار کلمه عبور صحيح نيست', 'error', 250, 'rtl', 5); tForm.usr_pass2.focus(); return; } try{ if(tForm.usr_code.value.match(/\d{4}/) != tForm.usr_code.value || tForm.usr_code.value == ""){ xHint(tForm.usr_code, 'لطفاً کد امنيتی را بصورت صحيح وارد نمائيد. اين کد يک عدد چهار رقمی است.\nدرصورتيکه کد موجود خوانا نيست روی آن دوبار کليک (Double Click) کرده و سپس کد جديد را وارد نمائيد.', 'اشکال در کد امنيتی', 'error', 250, 'rtl', 10); tForm.usr_code.focus(); return; } }catch(e){}; if(!$("signupAgreement").checked){ xHint($("signupAgreement"), 'شما برای عضويت در بردوباخت بايد قوانين مربوط به آن را مطالعه نمائيد و با انتخاب اين گزينه موافقت خود را با آنها اعلام کنيد', 'قوانين بردوباخت', 'error', 250, 'rtl', 5); $("signupAgreement").focus(); return; } xHintClose(); var FormCont = createQuery(tForm); $("signupHolder").innerHTML = loading; getContent('../global/index.php', 'section=guest&module=objects&cmd=loginSignupSend&'+FormCont+'&_r_'+Math.random(), '$("signupHolder").innerHTML = Contents;', '', 'POST'); return; } function changeVideo(where) { if(where == 1 || where == 2) videosPg.lock(); if(where == 1) moveIt('videoContainer', 'style.left', 312, 0, 'videosPg.unlock();'); if(where == 2) moveIt('videoContainer', 'style.left', 0, 312, 'videosPg.unlock();'); } function changeMainNesw(where) { if(where == 1 || where == 2 || where == 3){ mainNewsPg.lock(); $("mainNeswProgress").style.background = "url(../images/them/progressO.gif) no-repeat 0px -26px"; } if(where == 1) if(mainNewsPg.lastPos == 2) moveIt('mainNewsContainer', 'style.left', 290, 0, 'mainNewsPg.unlock();'); else moveIt('mainNewsContainer', 'style.left', 580, 0, 'mainNewsPg.unlock();'); if(where == 2) if(mainNewsPg.lastPos == 1) moveIt('mainNewsContainer', 'style.left', 0, 290, 'mainNewsPg.unlock();'); else moveIt('mainNewsContainer', 'style.left', 580, 290, 'mainNewsPg.unlock();'); if(where == 3) if(mainNewsPg.lastPos == 2) moveIt('mainNewsContainer', 'style.left', 290, 580, 'mainNewsPg.unlock();'); else moveIt('mainNewsContainer', 'style.left', 0, 580, 'mainNewsPg.unlock();'); } function autochangeMainNews() { if(!autochangeNewsRun){ setTimeout("autochangeMainNews()", 1000); return; } var id = xGetInt($("mainNeswProgress").style.background.substr($("mainNeswProgress").style.background.indexOf("px")))/13; var newid = (id>=14)?2:id*1+1; if (newid == 2){ mainNewsPg.next(true); } $("mainNeswProgress").style.backgroundPosition = "0px -"+newid*13+"px"; setTimeout("autochangeMainNews()", 1500); } var autochangeNewsRun = true; function autochangeNewsPP() { if(autochangeNewsRun){ autochangeNewsRun = false; $("autochangeNewsPPBtn").style.background = "url(../images/them/progressO.gif) no-repeat 0px -13px"; }else{ autochangeNewsRun = true; $("autochangeNewsPPBtn").style.background = "url(../images/them/progressO.gif) no-repeat 0px 0px"; } } function changeNeswTextSite(where) { switch(where){ case 1: $("newsDetailBody").style.fontSize = "12px"; $("newsDetailBody").style.lineHeight = "20px"; $("relatedNewsBox").style.fontSize = "11px"; $("relatedNewsBox").style.lineHeight = "18px"; break; case 2: $("newsDetailBody").style.fontSize = "16px"; $("newsDetailBody").style.lineHeight = "24px"; $("relatedNewsBox").style.fontSize = "16px"; $("relatedNewsBox").style.lineHeight = "24px"; break; } } function emoticonsWin(cmd, w) { switch(cmd){ case 'show': xMakeVisible("EmoticonsWin"); document.getElementsByTagName("body")[0].onclick = function(){ xMakeHidden("EmoticonsWin"); document.getElementsByTagName("body")[0].onclick = function(){}; }; break; case 'add': $("reviewMsgBody").value = $("reviewMsgBody").value + " " + w + " "; $("reviewMsgBody").focus(); break; } } function img2btn() { var img = document.images; for(k in img) try{ if(img[k].className.toString().indexOf('autoBtn') != -1){ cmd = (typeof(img[k].onclick) == "undefined")?'':img[k].onclick.toString().substr(12); xBtnCreate(img[k], cmd); } }catch(e){} } var sitePicture = null; var btnImage = null; var liveSession = null; function makeSessionAlive() { if(!liveSession) liveSession = setInterval("getContent('../global/getfile.php','cmd=session');", 300000); return liveSession; } function createSiteObj() { btnImage = new xBtn('../images/them/siteImages.gif'); sitePicture = new xpopupImg('enlarger', 'sitePicture'); makeSessionAlive(); } runAtScriptLoad.push("createSiteObj();"); function xchangeTab(whiche, groupName) { for(var i=1;i<20;i++) try{ $(groupName+"tab"+i).className = 'tab'; $(groupName+"cont"+i).style.display = 'none'; }catch(e){} $(groupName+"tab"+whiche).className = 'tab-on'; $(groupName+"cont"+whiche).style.display = ''; $(groupName+"tab"+whiche).blur(); } var imageList; function imageNavigator(obj, array) { if(typeof(obj) == "object"){ var objName = obj.id.split('MainPic')[0]; var w = obj.width; var h = obj.height; opacity(objName+"MainPic", 0, 100, 1000); var t = 52; var l = Math.round((600 - w)/2)+31; $(objName + "PicBot").innerHTML = "<br>"+ '<div style="height:0px; width:'+w+'px; overflow:visible;position:absolute; top:'+t+'px; left:'+l+'px;">'+ '<table width="'+w+'" cellpadding="0" cellspacing="0">'+ '<tr>'+ '<td width="'+Math.round(w/2-25)+'" aligh="left"><a id="imageNavigatorL" style="width:'+Math.round(w/2-25)+'px; height:'+h+'px;" class="imgNavigatorL" href="javascript:imageNavigator(\''+objName+'\', -1)"></a></td>'+ '<td width="50"><img src="../images/blank.gif" width="50" height="50" alt+"" /></td>'+ '<td width="'+Math.round(w/2-25)+'" aligh="right"><a id="imageNavigatorR" style="width:'+Math.round(w/2-25)+'px; height:'+h+'px;" class="imgNavigatorR" href="javascript:imageNavigator(\''+objName+'\',+1)"></a></td>'+ '</tr>'+ '</table>'+ '</div>'; curKey = xArraySearch('../global/cache/'+obj.src.split('global/cache/')[1], imageList); imgId = obj.src.split('pic_gallery_')[1].split('_')[0]; $("imageOptionDirectUrl").value = 'http:\/\/www.bordobakht.com\/global\/picture'+imgId+'gallery.html'; $("imageNavigatorL").className = (imageList[curKey-1])?"imgNavigatorL":"imgNavigatorDis"; $("imageNavigatorR").className = (imageList[curKey*1+1])?"imgNavigatorR":"imgNavigatorDis"; }else if(typeof(array) == "object"){ imageList = array; }else{ imgId = $(obj+"MainPic").src.split('pic_gallery_')[1].split('_')[0]; curKey = xArraySearch('../global/cache/'+$(obj+"MainPic").src.split('global/cache/')[1], imageList); if(array < 0) if(imageList[curKey-1]){ $(obj+'PicBot').innerHTML=''; newImgId = imageList[curKey-1].split('pic_gallery_')[1].split('_')[0]; opacity(obj+"MainPic", 100, 0, 500, "$('"+obj+"MainPic').src = '"+imageList[curKey-1]+"';"); $("imageOptionDirectUrl").value = 'http:\/\/www.bordobakht.com\/global\/picture'+newImgId+'gallery.html'; } if(array > 0) if(imageList[curKey*1+1]){ $(obj+'PicBot').innerHTML=''; newImgId = imageList[curKey*1+1].split('pic_gallery_')[1].split('_')[0]; opacity(obj+"MainPic", 100, 0, 500, "$('"+obj+"MainPic').src = '"+imageList[curKey*1+1]+"';"); $("imageOptionDirectUrl").value = 'http:\/\/www.bordobakht.com\/global\/picture'+newImgId+'gallery.html'; } } } function changePageType() { if($("pageType1").className == 'hidden'){ $("pageType1").className = ''; $("pageType21").className = 'hidden'; $("pageType22").className = 'hidden'; xsetCookie('GalleryPageType', '1'); }else{ $("pageType1").className = 'hidden'; $("pageType21").className = ''; $("pageType22").className = ''; xsetCookie('GalleryPageType', '2'); } } function doItAgain(sender, key) { var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /></td></tr>'+ '</table>'; if(typeof(sender) != "object" || typeof(key) == "undefined") return; request = eval('request'+key); if(typeof(request) != "object") return; query = 'retry=1'; for(k in request) try{ query += (k != '_r_')?'&'+k+'='+request[k]:Math.random(); } catch(e){} parent = sender; while(!parent.id) parent = parent.parentNode; parent.innerHTML = loading; getContent('../global/index.php', query, '$("'+parent.id+'").innerHTML = Contents;', '', 'POST'); } function gotoNewsPage(page) { document.location.href = document.location.href.split('#')[0] + '#top'; $('newssearchResultForm').xpage.value = page; xsubmitForm('newssearchResultForm', 'newsSearchResult'); } var matchBannerPos = 0; function nextBanner() { moveIt("matchBanner", 'style.top', matchBannerPos*184, matchBannerPos*184+184, setTimeout("nextBanner()", 5000), 6); matchBannerPos++; if(matchBannerPos >= matchBannerMax ) matchBannerPos = 0; } var sbgTime = 0; var sbtimeFreez = true; var sbtimerInt = null; function sbTimer(cmd, value) { if(sbtimerInt == null) sbtimerInt = setInterval('sbTimer()', 1000); switch (cmd){ case 'reset': if(typeof(value) == "undefined") value = "0"; else{ try{ value = value.split(":")[0]*60+value.split(":")[1]*1; }catch(e){}; } sbgTime = value; sbTimer('resume'); sbTimer('display'); break; case 'display': if(sbtimeFreez && value != 'force') break; tmpH = Math.floor(sbgTime/60); tmpM = sbgTime - tmpH*60; if(tmpH < 10) tmpH = '0' + tmpH; if(tmpM < 10) tmpM = '0' + tmpM; try{ $("scoreBoardTimeSource").innerHTML = F_(tmpH+":"+tmpM); }catch(e){} break; case 'pause': case 'puse': if(typeof(value) != "undefined") sbTimer('reset', value); sbtimeFreez = true; try{ $("scoreBoardTimeSource").style.color="#800000"; }catch(e){} sbTimer('display', 'force'); break; case 'resume': sbtimeFreez = false; try{ $("scoreBoardTimeSource").style.color="#000000"; }catch(e){} break; default: sbgTime++; sbTimer('display'); break; } } var reportSchedule = 0; function showReport(cmd, id) { switch(cmd){ case "stop": try{ clearTimeout(reportSchedule); }catch(e){} break; case "show": showReport("stop"); makeSessionAlive(); liveReportWin.winDirectUrl = 'report'+id+'.html'; liveReportWin.winMainPage = 'report.htm?'+id; liveReportWin.onLoad = 'showReport("reload", "'+id+'");'; liveReportWin.show(); if(liveReportWin.winStatus == 'visible') showReport("reload",id); break; case "fetch": if(typeof(report[0]) != "undefined") $("lrHeader").innerHTML = report[0]; if(typeof(report[1]) != "undefined") $("lrGameDetail").innerHTML = report[1]; if(typeof(report[2]) != "undefined") $("lrGameGoals").innerHTML = report[2]; if(typeof(report[3]) != "undefined") $("lrTeamArrangeH").innerHTML = report[3]; if(typeof(report[4]) != "undefined") $("lrGameStat").innerHTML = report[4]; if(typeof(report[5]) != "undefined") $("lrGameReport").innerHTML = report[5]; $("lrRefreshTime").innerHTML = liveReportRefreshTime/1000; liveReportWin.status('اطلاعات به روزرسانی شد.'); showReport("schedule", id); break; case "reload": liveReportWin.status('در حال دريافت اطلاعات از سايت بردوباخت ....'); getContent('../global/reportdata'+id+'.html', '', 'showReport(\'fetch\',"'+id+'");', '$("lrRefreshTime").innerHTML = 10;'+ 'liveReportWin.status(\'دريافت اطلاعات با مشکل مواجه شد. لطفا وضعيت ارتباط خود را با اينترنت بررسی کنيد\');'+ 'showReport("schedule", "'+id+'");'+ 'xHint($("liveReportWinStatus"), "اشکال در برقراری اتصال با سرور بردوباخت", "اشکال در ارتباط", "error", 200, "rtl", 5);' ); break; case "schedule": try{ remaindTime = xGetInt(E_($("lrRefreshTime").innerHTML)); if(remaindTime){ $("lrRefreshTime").style.color = (remaindTime < 7)?"#CA0000":"#999999"; remaindTime--; $("lrRefreshTime").innerHTML = F_(remaindTime); clearTimeout(reportSchedule); reportSchedule = setTimeout('showReport("schedule", '+id+');', 1000); }else showReport("reload", id); }catch(e){} break; } } function galleryGoto(page) { loading = '<br /><br /><br /><br />'+ '<center>'+ '<div class="whiteBoxHolder" style="width:230px;margin:0 auto;text-align:left;">'+ '<div class="BoxHeader"><div></div></div>'+ '<div class="BoxContent">'+ '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /><br /><br /></tr>'+ '<tr>'+ '<td>'+ 'لطفاً صبر کنيد '+ '</td><td>'+ '<img src="../images/them/loading.gif" width="16" height="16" alt="" />'+ '</td>'+ '</tr>'+ '<tr><td><br /><br /><br /><br /></tr>'+ '</table>'+ '</div>'+ '<div class="BoxFooter"><div></div></div>'+ '</div>'+ '</center>'+ '<br /><br /><br /><br />'; var searchTerm = $("searchterm").value; $("gallerySearchResult").innerHTML = loading; document.location.href = document.location.href.split('#')[0]+'#top'; getContent('../global/index.php', 'section=guest&module=gallery&cmd=search&page='+page+'&Search='+searchTerm, '$("gallerySearchResult").innerHTML = Contents;', '', 'POST'); } function reformatWeeks(leagueid) { for(i=0;i<50;i++) try{ xMakeHidden('leagueweekTR'+i); }catch(e){} xMakeVisible('leagueweekTR'+leagueid); } function submitContact(which) { switch(which){ case 1: if($("cf1SectionFld").value.length < 2){ xHint($("cf1SectionFld"), 'لطفا نام بخشی که اشکال مد نظر شما در آن وجود دارد را وارد کنيد.\nمثلا: بخش اخبار', 'نام بخش', 'error', 250, 'rtl', 5); $("cf1SectionFld").focus(); return; } if($("cfUrlFld").value.length < 2){ xHint($("cfUrlFld"), 'لطفا نام صفحه ای که اشکال در آن وجود دارد را ذکر کنيد.\nمثلا: ليست اخبار يا news1234.html', 'نام صفحه', 'error', 250, 'rtl', 5); $("cfUrlFld").focus(); return; } break; case 2: if($("cf2SectionFld").value.length < 2){ xHint($("cf2SectionFld"), 'لطفا نام بخشی که اشتباه مد نظر شما در آن وجود دارد را وارد کنيد.\nمثلا: بخش اخبار', 'نام بخش', 'error', 250, 'rtl', 5); $("cf2SectionFld").focus(); return; } if($("cf2TitleFld").value.length < 2){ xHint($("cf2TitleFld"), 'لطفا عنوان مطلبی که اشتباه در آن وجود دارد را ذکر کنيد.html', 'عنوان مطلب', 'error', 250, 'rtl', 5); $("cf2TitleFld").focus(); return; } break; case 3: if($("cf3comment").value.length < 10){ xHint($("cf3comment"), 'لطفا نظر و يا پيشنهاد خود را در اين قسمت وارد نمائيد.', 'نظری وارد نشد', 'error', 250, 'rtl', 5); $("cf3comment").focus(); return; } break; case 4: if($("cf4comment").value.length < 10){ xHint($("cf4comment"), 'لطفا پيام خود را برای مدير سايت در اين قسمت وارد نمائيد.', 'پيامی وارد نشد', 'error', 250, 'rtl', 5); $("cf4comment").focus(); return; } break; case 100: if($("cf1UersnameFld").value.length < 2){ xHint($("cf1UersnameFld"), 'لطفا نام کاربر متخلف را وارد کنيد.', 'کاربر متخلف', 'error', 250, 'rtl', 5); $("cf1UersnameFld").focus(); return; } if($("cfUrlFld").value.length < 2){ xHint($("cfUrlFld"), 'لطفا نام صفحه ای که مورد تخلف در آن وجود دارد را ذکر کنيد.\nمثلا: خبر 1234 يا news1234.html', 'نام صفحه', 'error', 250, 'rtl', 5); $("cfUrlFld").focus(); return; } break; } try{ xHintClose() }catch(e){}; curForm = $("siteContactForm"+which); if(curForm) xsubmitForm("siteContactForm"+which, 'contactusMainHolder'); } function contactForm(whiche) { if(whiche == "check") whiche = document.location.href.split('#')[1]; if(whiche > 4 || whiche <1 || typeof(whiche) == "undefined") return; for(i=0;i<5;i++) try{ xMakeHidden('cform'+i); $("cformDiv"+i).className = "wireBoxHolder"; $("cformDiv"+i).onmouseout = function(){this.className='wireBoxHolder';}; $("cformTik"+i).style.background=""; }catch(e){} try{ xMakeVisible('cform'+whiche); $("cformDiv"+whiche).className = "wireBoxGray"; $("cformDiv"+whiche).onmouseout = function(){}; $("cformTik"+whiche).style.background="#F6F6F6"; }catch(e){} } function changePass() { var loading = '<table border="0" cellpadding="0" cellspacing="0" width="100px" style="margin:0 auto">'+ '<tr><td><br /><br /></td></tr>'+ '<tr>'+ '<td>لطفاً صبر کنيد</td>'+ '<td><img src="../images/them/loading.gif" width="16" height="16" alt="" /></td>'+ '</tr>'+ '<tr><td><br /><br /></td></tr>'+ '</table>'; tForm = $('userchangepass'); var FormCont = createQuery(tForm); if($('accusername').value.length <4){ xHint($('accusername'), 'لطفا نام کاربری خود را وارد نمائيد', 'نام کاربری', 'error', 200, 'rtl', 5); $('accusername').focus(); return; } if($("newspassword1").value.length <4){ xHint($("newspassword1"), 'کلمه عبور خود را وارد نمائيدو توجه داشته باشيد که کلمه عبور شما نسبت به کوچک يا بزرگ بودن حروف حساس است. (case sensitive)', 'کلمه عبور', 'error', 200, 'rtl', 5); $("newspassword1").focus(); return; } if($("newspassword1").value != $("newspassword2").value){ xHint($("newspassword2"), 'کلمه عبور شما با تکرار کلمه آن مطابقت ندارد.', 'تکرار کلمه عبور', 'error', 200, 'rtl', 5); $("newspassword2").focus(); return; } $('changepassholder').innerHtml = loading; getContent('../global/index.php', 'section=guest&module=objects&cmd=changepasssend&'+FormCont+'&_r_'+Math.random(), '$("changepassholder").innerHTML = Contents;', '', 'POST'); } function updateReviewCnt(Arr) { if(typeof(Arr) != 'object') return false; for(Key in Arr){ try{ if(typeof(Arr[Key]) != "integer" && typeof(Arr[Key]) != "string") continue; if(Arr[Key]*1 > 0) $('newsComment'+Key).innerHTML = F_(Arr[Key]) + ' نظر'; } catch(e){} } return true; } function incReviwCnt(id) { try{ curValue = xGetInt(E_($('newsComment'+id).innerHTML)); curValue++; $('newsComment'+id).innerHTML = F_(curValue) + ' نظر'; }catch(e){} } ;try{loadTrigger('javascript');}catch(e){}