function MintaxHandler(u){var ajaxUrl=u;var cookieHandler=new CookieHandler();var loadingHandler;var method="POST";var debug=false;var iFrame=null;var isRunning=false;var lineUp=false;var ajaxProtocols=["Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];this.setDebug=function(d){debug=d;};this.setMethod=function(m){method=m;};this.setUrl=function(u){ajaxUrl=u;};this.setLineUp=function(v){lineUp=v;};this.getIsRunning=function(){return isRunning;};this.getLoadingHandler=function(){return loadingHandler;};this.setLoadingHandler=function(l){loadingHandler=l;};this.setParam=function(p){try{if(typeof(p)!="undefined"&&p.length>0){params=p.split("&");for(var i=0;i<params.length;i++){param=params[i].split("=");cookieHandler.set(param[0],param[1],"7");}}}catch(e){if(debug)alert("setParam error: "+e.message);}return};this.send=function(callBackFunction,params){if(loadingHandler)loadingHandler.play();var result=null;result=requestData(callBackFunction,params);if(!callBackFunction){if(loadingHandler)loadingHandler.stop();}};this.sendWithoutLoading=function(callBackFunction,params){var result=null;result=requestData(callBackFunction,params);};function getXMLHttpRequest(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else{if(window.AjaxProtocol){return new ActiveXObject(window.AjaxProtocol);}else{for(var i=0;i<ajaxProtocols.length;++i){var ajaxProtocol=ajaxProtocols[i];var response=null;try{response=new ActiveXObject(ajaxProtocol);}catch(e){continue;}window.AjaxProtocol=ajaxProtocol;return response;}}}return null;}function requestData(callBackFunction,params){if(lineUp&&isRunning){return;}isRunning=true;var result=null;var reqHTML=getXMLHttpRequest();if(!reqHTML){result={"error":"NOXMLHTTP"};if(debug)alert("error: "+result.error);if(callBackFunction)clientCallBack(result);return result;}if(!ajaxUrl){result={"error":"NOURL"};if(debug)alert("error: "+result.error);return result;}reqHTML.open(method,ajaxUrl,callBackFunction?true:false);reqHTML.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");reqHTML.setRequestHeader("X-Requested-With","XMLHttpRequest");if(callBackFunction){function onReadyStateChange(){if(reqHTML.readyState!=4)return;var result=null;isRunning=false;try{if(reqHTML.status!=200){throw({message:[reqHTML.statusText,"(",reqHTML.status,")"].join("")});}result=reqHTML.responseText;if(debug)alert("response text: "+result);if(result!=""){result=eval("("+result+")");}}catch(e){result={error:null};}if(debug&&result.error)alert("error:"+result.error);if(result.error=="AUTH_ERROR"){location="index.php";}else{callBackFunction(result);}if(loadingHandler)loadingHandler.stop();reqHTML=null;}reqHTML.onreadystatechange=onReadyStateChange;}try{params="Params="+base64.encode(params);reqHTML.send(params);if(!callBack){if(debug)alert("Sync'ed execution. Response Text: "+reqHTML.responseText);try{result=eval(x.responseText);}catch(e){result={error:"Client-side parse error:"+e.message};}if(debug&&result.error)alert("error: "+result.error);}}catch(e){result={error:"Server-side error: "+e.message};}delete reqHTML;return result;}}function CookieHandler(){this.set=function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else{var expires="";}document.cookie=name+"="+value+expires+"; path=/";};this.get=function(name){name+="=";var s=document.cookie.split("; ");for(var i=0;i<s.length;i++){var c=s[i];if(c.indexOf(name)==0){return unescape(c.substring(name.length,c.length));}}return null;};this.erase=function(name){this.set(name,"",-1);};this.enabled=function(){this.set("cookietest","cookietest");return this.get("cookietest")!=null;};}function WarningHandler(){var id=Math.round(Math.random()*10000000000);var div2='<div id="WarningWindow_'+id+'" style="display:none; visibility: hidden"><div style="position:absolute; top:0px; left:0px; width:100%; height:100%; z-index:99; background-color:#CDCDCD; opacity: 0.7; -moz-opacity: 0.7; -khtml-opacity: 0.7; filter: alpha(opacity=70);"></div>	<div style="position:absolute; top:0px; left:0px; width:100%; height:100%; z-index:100;"><table border="0" width="100%" height="100%"><tr><td height="100%" valign="middle" align="center"><table class="yazi" style="background-color:#FFFFFF; width:300px; height:150px; border:2px solid #0074E0"><tr><td align="center"><span id="WarningText_'+id+'"></span><br /><br /><span id="ConfirmText_'+id+'"></span></td></tr></table></td></tr></table></div></div>';document.body.innerHTML=div2+document.body.innerHTML;div2=document.getElementById('WarningWindow_'+id);war=document.getElementById('WarningText_'+id);conf=document.getElementById('ConfirmText_'+id);this.show=function(str,type,func1){war.innerHTML=str;if(type==1){conf.innerHTML='<a style="cursor:pointer" onclick="'+func1+'(1)" class="link">Kapat</a>';}else{conf.innerHTML='<a style="cursor:pointer" onclick="'+func1+'(2)" class="link">Evet</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="cursor:pointer" onclick="'+func1+'(0)" class="link">Hayýr</a>';}div2.style.display='';div2.style.visibility='visible';};this.close=function(){div2.style.display='none';div2.style.visibility='hidden';};}function LoadingHandler(){var id=Math.round(Math.random()*10000000000);var player=null;var top=0;if(document.documentElement.scrollTop){top=document.documentElement.scrollTop;}else if(document.body.scrollTop){top=document.body.scrollTop;}var div='<span id="LoadingDiv_'+id+'" style="z-index:105;display:none;visibility:hidden;background-color:maroon;color:#FFFFFF;font-family:Verdana;font-size:10pt;padding: 3px 10px 3px 10px;margin: 0 0 0 0; width:82px;height:20px; position: absolute; top:'+top+'px; right:0px"></span>';document.body.innerHTML=div+document.body.innerHTML;div=document.getElementById('LoadingDiv_'+id);this.play=function(){show();player=setInterval(animate,200);};this.stop=function(){window.clearInterval(player);hidden();};this.error=function(){div.innerHTML="<b>Hata!!!</b>";window.clearInterval(player);setTimeout(hidden,5000);};function animate(){div.style.borderColor=div.style.backgroundColor=((div.style.backgroundColor=='maroon')?'FireBrick':'maroon');}function show(){var top=0;if(document.documentElement.scrollTop){top=document.documentElement.scrollTop;}else if(document.body.scrollTop){top=document.body.scrollTop;}div.style.top=top+"px";div.innerHTML="Yükleniyor...";div.style.display='';div.style.visibility='visible';}function hidden(){div.style.display='none';div.style.visibility='hidden';}}var urlCode={encode:function(str){var SAFECHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()";var HEX="0123456789ABCDEF";var encoded="";for(var i=0;i<str.length;i++){var ch=str.charAt(i);if(ch==" "){encoded+="+";}else if(SAFECHARS.indexOf(ch)!=-1){encoded+=ch;}else{var charCode=ch.charCodeAt(0);if(charCode<=255){encoded+="%";encoded+=HEX.charAt((charCode>>4)&0xF);encoded+=HEX.charAt(charCode&0xF);}}}return encoded;},decode:function(str){var HEXCHARS="0123456789ABCDEFabcdef";var plaintext="";var i=0;while(i<str.length){var ch=encoded.charAt(i);if(ch=="+"){plaintext+=" ";i++;}else if(ch=="%"){if(i<(str.length-2)&&HEXCHARS.indexOf(encoded.charAt(i+1))!=-1&&HEXCHARS.indexOf(encoded.charAt(i+2))!=-1){plaintext+=unescape(encoded.substr(i,3));i+=3;}else{i++;}}else{plaintext+=ch;i++;}}return plaintext;}};var base64={encode:function(str){var Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");var c1,c2,c3;var buf=[];var len=str.length;var i=0;while(i<len){c1=str.charCodeAt(i)&0xff;c2=str.charCodeAt(i+1);c3=str.charCodeAt(i+2);buf.push(Chars[(c1>>2)]);if(i+1==len){buf.push(Chars[(c1&0x3)<<4],"==");break;}buf.push(Chars[((c1&0x3)<<4)|((c2&0xF0)>>4)]);if(i+2==len){buf.push(Chars[(c2&0xF)<<2],"=");break;}buf.push(Chars[((c2&0xF)<<2)|((c3&0xC0)>>6)],Chars[(c3&0x3F)]);i+=3;}return buf.join("");},decode:function(str){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;str=str.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=this.keyStr.indexOf(str.charAt(i++));enc2=this.keyStr.indexOf(str.charAt(i++));enc3=this.keyStr.indexOf(str.charAt(i++));enc4=this.keyStr.indexOf(str.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}if(enc4!=64){output=output+String.fromCharCode(chr3);}}while(i<input.length);return output;}};var htmlCode={encode:function(str){str=str.replace(/Ü/g,"&#220;");str=str.replace(/Þ/g,"&#350;");str=str.replace(/Ð/g,"&#286;");str=str.replace(/Ç/g,"&#199;");str=str.replace(/Ý/g,"&#304;");str=str.replace(/Ö/g,"&#214;");str=str.replace(/ü/g,"&#252;");str=str.replace(/þ/g,"&#351;");str=str.replace(/ð/g,"&#287;");str=str.replace(/ç/g,"&#231;");str=str.replace(/ý/g,"&#305;");str=str.replace(/ö/g,"&#246;");return str;},decode:function(str){str=str.replace(/&#220;/g,"Ü");str=str.replace(/&#350;/g,"Þ");str=str.replace(/&#286;/g,"Ð");str=str.replace(/&#199;/g,"Ç");str=str.replace(/&#304;/g,"Ý");str=str.replace(/&#214;/g,"Ö");str=str.replace(/&#252;/g,"ü");str=str.replace(/&#351;/g,"þ");str=str.replace(/&#287;/g,"ð");str=str.replace(/&#231;/g,"ç");str=str.replace(/&#305;/g,"ý");str=str.replace(/&#246;/g,"ö");return str;}};function GenUniqueID(){return Math.round(Math.random()*10000000000);}function GetQueryStringParam(param){var paramValue=new String();var paramName=param.toLowerCase()+"=";if(window.location.search.length<2){return paramValue;}var queryString=window.location.search.substring(1).toLowerCase();var queryStringArray=queryString.split("&");for(var i=0;i<queryStringArray.length;i++){var strIndex=queryStringArray[i].indexOf(paramName);if(strIndex>-1){paramValue=queryStringArray[i].substring(strIndex+paramName.length);break;}}return paramValue;}function trCode(value){return urlCode.encode(htmlCode.encode(value));}