var phrase=phrase||new Array();var Dom=YAHOO.util.Dom;var Event=YAHOO.util.Event;var CustomEvent=YAHOO.util.CustomEvent;var Lang=YAHOO.lang;var UA=YAHOO.env.ua;var Anim=YAHOO.util.Anim||null;var Con=YAHOO.util.Connect||null;var Cookie=YAHOO.util.Cookie||null;var UNDELETEABLES=UNDELETEABLES||new Array();var __empty_function=function(){};var __true_function=function(){return true;};if(Lang.isUndefined(console)){var console={log:__empty_function,debug:__empty_function,info:__empty_function,warn:__empty_function,error:__empty_function,assert:__empty_function,dirxml:__empty_function,time:__empty_function,timeEnd:__empty_function};}var SECURITYHASH=SECURITYHASH||'';var ADMINHASH=ADMINHASH||'';var SESSIONHASH=SESSIONHASH||'';var STYLEDIR=STYLEDIR||'';var SECURITYHASHURL=(SECURITYHASH!=='')?'securityhash='+SECURITYHASH+'&':'';var ADMINHASHURL=(ADMINHASH!=='')?'adminhash='+ADMINHASH+'&':'';var SESSIONURL=(SESSIONHASH!=='')?'s='+SESSIONHASH+'&':'';var CP_AREA=(ADMINHASH!=='')?true:false;UA.win=(tlc(navigator.userAgent).indexOf('win')!=-1)?true:false;function Yonca_System(){this.ActiveX=null;this.isWinLoaded=false;this.isDomLoaded=false;this.isBoxAreaLoaded=false;this.domready_stack=new Array();this.loading=null;this.dialog=null;this.scroll_dragging=false;this.toggle=false;}Yonca_System.prototype.init=function(funcname){Event.addListener(window,'load',function(e){this.isWinLoaded=this.isDomLoaded=this.isBoxAreaLoaded=true;},this,true);this.domready_register(function(){Yonca.isDomLoaded=true;});Event.onContentReady('yncboxarea',function(){Yonca.isBoxAreaLoaded=true;});Event.on(window,'scroll',Yonca_System.prototype.scroll_handler,this,true);};Yonca_System.prototype.domready_register=function(funcname){this.domready_stack[this.domready_stack.length]=funcname;};Yonca_System.prototype.domready_fire=function(){if(this.domready_stack.length>0){var _this=this;Event.onDOMReady(function(){_this.isDomLoaded=true;for(var i=0;i<_this.domready_stack.length;i++){try{_this.domready_stack[i]();}catch(e){console.warn('onDOMReady fonksiyonu çalıştırılırken hata oluştu: '+_this.domready_stack[i]);}delete _this.domready_stack[i];}});}};Yonca_System.prototype.scroll_handler=function(){this.scroll_dragging=true;var _this=this;setTimeout(function(){_this.scroll_dragging=false;},0);};Yonca_System.prototype.dialog_hide_handler=function(){if(Lang.isFunction(this.hide)){this.hide();}};Yonca_System.prototype.unicode_urlencode=function(text){text=escape(text.toString()).replace(/\+/g,'%2B');var matches=text.match(/(%([0-9A-F]{2}))/gi);if(matches){for(var matchid=0;matchid<matches.length;matchid++){var code=matches[matchid].substring(1,3);if(parseInt(code,16)>=128){text=text.replace(matches[matchid],'%u00'+code);}}}text=text.replace('%25','%u0025');return text;};Yonca_System.prototype.toggle_editor=function(editorobj){var idarea=eval('idArea'+editorobj.oName),iframe=eval('idContent'+editorobj.oName),textarea=Dom.get(editorobj.idTextArea);if(this.toggle===false){var content='';switch(editorobj.mode){case'HTMLBody':content=editorobj.getHTMLBody();break;case'XHTMLBody':content=editorobj.getXHTMLBody();break;case'XHTML':content=editorobj.getXHTML();break;case'HTML':content=editorobj.getHTML();break;default:return false;}this.toggle=true;Dom.addClass(idarea,'editor-hidden');Dom.addClass(iframe,'editor-hidden');textarea.value=content.replace(/<\/?\w[^<>]*>/gi,'');textarea.untouch=textarea.value;Dom.setStyle(textarea,'display','');}else{this.toggle=false;if(trim(textarea.untouch)!=trim(textarea.value)){editorobj.loadHTML(textarea.value);}Dom.setStyle(textarea,'display','none');Dom.removeClass(idarea,'editor-hidden');Dom.removeClass(iframe,'editor-hidden');}};Yonca_System.prototype.fetch_parent_obj=function(tagname,obj,verifyfunc){verifyfunc=Lang.isFunction(verifyfunc)?verifyfunc:function(obj){return true;};while((obj=obj.parentNode)!==null){if(nn(obj)==tagname&&verifyfunc(obj)){return obj;}}return null;};Yonca_System.prototype.set_visibility=function(obj,hide){obj=Lang.isObject(obj)?obj:Dom.get(obj);if(!obj){return false;}hide=hide||null;if(hide===null){hide=(Dom.getStyle(obj,'display')=='none'?false:true);}Dom.setStyle(obj,'display',(hide?'none':''));};Yonca_System.prototype.element=function(elm,ext){var cr=document.createElement(elm);if(ext){Lang.augmentObject(cr,ext,true);}return cr;};var Yonca=new Yonca_System();Yonca.init();function ia(n,h){for(var i=0;i<h.length;i++){if(n==h[i]){return true;}}return false;}function trim(s){return Lang.trim(s);}function htmlspecialchars_uni(str){str=''+str;return str.replace('>','&gt;').replace('<','&lt;').replace('"','&quot;').replace(/&(?!(amp;))/g,'&amp;');}function sprintf(){if(arguments&&arguments.length>1){var mainvar=arguments[0];for(var i=1;i<arguments.length;i++){mainvar=mainvar.replace('%'+i+'$s',arguments[i]);}return mainvar;}return Lang.isUndefined(arguments[0])?false:arguments[0];}function areyousure(_this,e){if(!confirm('Bu işlemin dönEEyoktur.\nDevam etmek istediğinizden emin misiniz?')){Event.preventDefault(e);}else{Event.preventDefault(e);window.location=String(_this.href).replace(/&(amp;)?nojs\=1/,'');}}function execute_selection_change(selval){if(!Lang.isUndefined(selval)&&Lang.isString(selval)&&selval!=''){eval(selval);}}function lhform(url,pm,datas,trg){var form=document.createElement('form');form.method=pm?'post':'get';form.target=Lang.isUndefined(trg)?'_self':trg;form.action=url;if(!datas['s']&&(SESSIONURL||pm)){datas['s']=SESSIONHASH;}if(pm){if(!datas['securityhash']){datas['securityhash']=SECURITYHASH;}if(!datas['adminhash']&&ADMINHASHURL){datas['adminhash']=ADMINHASH;}}for(var i in datas){var io=document.createElement('input');io.type='hidden';io.name=i;io.value=datas[i];form.appendChild(io);}document.body.appendChild(form).submit();if(trg!='_self'){document.body.removeChild(form);}}function tlc(s){return s.toLowerCase();}function nn(o){return tlc(o.nodeName);}var _ACTIVE_AXIN=false;function axin(status,title,subtitle){if((status<0&&!_ACTIVE_AXIN)||(status>0&&_ACTIVE_AXIN)){return false;}title=title||'YÜKLENİYOR';subtitle=subtitle?'<div> '+String(subtitle)+'</div>':false;var header='<div class="loading">'+String(title)+(subtitle?subtitle:'</div>');if(CP_AREA){Yonca.loading=Yonca.dialog.loading_render();}else{Yonca.loading=Yonca.dialog.site_loading_render();}Yonca.loading.set_header(header);if(status===false||status===0){}else if(status<0){Yonca.loading.hide();_ACTIVE_AXIN=false;}else{Yonca.loading.show();_ACTIVE_AXIN=true;}}function center_object(idname){var obj=Lang.isObject(idname)?idname:Dom.get(idname);var hx=Math.round(Dom.getDocumentScrollLeft(document)+(Dom.getViewportWidth()/2)-(obj.offsetWidth/2));var hy=Math.round(Dom.getDocumentScrollTop(document)+(Dom.getViewportHeight()/2)-(obj.offsetHeight/2));if(hy>=170&&Dom.getDocumentScrollTop(document)==0){hy-=150;}Dom.setXY(obj,[hx,hy],false);}function contain_obj(obj,refobj,obj_pos,topmargin){topmargin=topmargin?parseInt(topmargin,10):0;obj=Lang.isObject(obj)?obj:Dom.get(obj);refobj=Lang.isObject(refobj)?refobj:Dom.get(refobj);var rocoord=Dom.getXY(refobj),vpwidth=Dom.getViewportWidth(),dif=0;switch(obj_pos){case'center':if(obj.offsetWidth>refobj.offsetWidth){rocoord[0]-=Math.round((obj.offsetWidth-refobj.offsetWidth)/2);}else{rocoord[0]+=Math.round((refobj.offsetWidth-obj.offsetWidth)/2);}break;case'left':rocoord[0]-=refobj.offsetWidth;break;case'right':rocoord[0]+=refobj.offsetWidth;break;}if(rocoord[0]>vpwidth){rocoord[0]-=rocoord[0]-vpwdith;}rocoord[1]+=topmargin;Dom.setXY(obj,rocoord,false);}var __PROC=null;function basic_async_request(url,onsuccess,onfail,extarg,allowkill){onsuccess=Lang.isFunction(onsuccess)?onsuccess:function(o){};onfail=Lang.isFunction(onfail)?onfail:function(o){};extarg=extarg?extarg:null;allowkill=!Lang.isUndefined(allowkill)?allowkill:true;if(Con.isCallInProgress(__PROC)){if(allowkill){Con.abort(__PROC);}else{alert('İşleminiz Devam etmekte lEfen bekleyin');return false;}}axin(1);__PROC=Con.asyncRequest('POST',url,{success:function(o){if(o.responseXML){var error=Dom.getElementsBy(function(){return true;},'error',o.responseXML)[0];if(error){axin(-1);if(CP_AREA){Yonca.dialog.render('asyncrequestalertbox',error.firstChild.nodeValue,{modaldialog:true,icon:Yonca.dialog.icons.WARNING,buttons:[{label:'Tamam',isDefault:true}]});}else{alert(error.firstChild.nodeValue);}if(typeof o.argument!='undefined'&&typeof o.argument.onrequesterror!='undefined'&&Lang.isFunction(o.argument.onrequesterror)){o.argument.onrequesterror();}Con.abort(__PROC);return false;}var result=false;try{result=onsuccess(o);}catch(e){}if(!result){axin(-1);}Con.abort(__PROC);}},failure:function(o){onfail(o);Con.abort(__PROC);axin(-1);},argument:extarg},''+SESSIONURL+SECURITYHASHURL+ADMINHASHURL+url.substr(url.indexOf('?')+1)+'&ajax=1');}function winopen(url,winid,width,height,wresizable){var resizeable_value=((typeof wresizable=='undefined'||!wresizable)?'no':'yes');var winid=winid?winid:'Window',base=Dom.getElementsBy(__true_function,'base');if(base&&base[0]&&base[0].href&&!url.match(/^\w+:\/\//)){url=base[0].href+url;}var win=window.open(url,winid,""+(typeof width!='undefined'&&width>0?"width="+width+",":"")+(typeof height!='undefined'&&height>0?"height="+height+",":"")+"status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable="+resizeable_value);win.focus();return win;}function calendar_register(calendarid){Yonca.domready_register(function(){function calbuttonclick(e,calendarid){var dateproperties=dateproperties||{START_WEEKDAY:1,MONTHS_SHORT:['Oca','\u015eub','Mar','Nis','May','Haz','Tem','A\u011fu','Eyl','Eki','Kas','Ara'],MONTHS_LONG:[phrase['yui_month_1'],phrase['yui_month_2'],phrase['yui_month_3'],phrase['yui_month_4'],phrase['yui_month_5'],phrase['yui_month_6'],phrase['yui_month_7'],phrase['yui_month_8'],phrase['yui_month_9'],phrase['yui_month_10'],phrase['yui_month_11'],phrase['yui_month_12']],WEEKDAYS_LONG:['Pazar','Pazartesi','Sal\u0131','\u00c7ar\u015famba','Per\u015fembe','Cuma','Cumartesi'],WEEKDAYS_MEDIUM:['Paz','Pts','Sal','\u00c7ar','Per','Cum','Cts'],WEEKDAYS_SHORT:[phrase['yui_sday_0'],phrase['yui_sday_1'],phrase['yui_sday_2'],phrase['yui_sday_3'],phrase['yui_sday_4'],phrase['yui_sday_5'],phrase['yui_sday_6']]};;if(typeof CALENDARNOW!='undefined'){dateproperties.mindate=CALENDARNOW;}var calmenu=Dom.get('calmenucontainer'),calmenuid='calmenucontainer';if(!calmenu){calmenu=document.createElement('div');calmenu.id=calmenuid;Dom.setStyle(calmenu,'visibility','hidden');Dom.setStyle(calmenu,'position','absolute');Dom.setStyle(calmenu,'top','-9999px');Dom.setStyle(calmenu,'left','-9999px');if(!CP_AREA){Dom.addClass(calmenu,'pcalendar');calmenu.innerHTML='<table cellpadding="0" cellspacing="0" border="0" class="pcaltable">'+'<tr><td class="calhead" colspan="2"><span class="calclosebtn" id="calclosebtn">&nbsp;</span> <span style="color: #ffffff">'+phrase['tarih_secin']+'</span></td></tr>'+'<tr><td colspan="2"><div id="sitecalendar"></div></td></tr></table>';calmenuid='sitecalendar';}document.body.appendChild(calmenu);}else if(!CP_AREA){calmenuid='sitecalendar';}var _this=this;calmenu.show=function(){Dom.setStyle(calmenu,'visibility','visible');var coords=Dom.getXY(_this);var x=coords[0]+_this.offsetWidth,y=coords[1]+_this.offsetHeight,vpx=Dom.getDocumentWidth(),vpy=Dom.getDocumentHeight();if((y+calmenu.offsetHeight)>=vpy){var fy=((y+calmenu.offsetHeight)-vpy);y=y-fy-10;}Dom.setXY(calmenu,[x,y],false);calmenu.hidden_state=true;};calmenu.hide=function(){Dom.setStyle(calmenu,'visibility','hidden');Dom.setXY(calmenu,[-9999,-9999],false);calmenu.hidden_state=false;};if(!CP_AREA){Event.on('calclosebtn','click',calmenu.hide);}var calendar=new YAHOO.widget.Calendar('buttoncalendar',calmenuid,dateproperties);calendar.render();calendar.selectEvent.subscribe(function(stype,calargs){if(calargs){var calarg=calargs[0][0],dayfield=Dom.get('day-field-'+calendarid);dayfield.value=calarg[2];Dom.get('year-field-'+calendarid).value=calarg[0];var selectobj=Dom.get('month-field-'+calendarid);if(CP_AREA){for(i=0;i<selectobj.options.length;i++){if(selectobj.options[i].value==calarg[1]){selectobj.selectedIndex=i;break;}}}else{selectobj.value=calarg[1];Dom.get('calendar-select-'+calendarid).innerHTML=calarg[2]+'/'+calarg[1]+'/'+calarg[0];}if(dayfield.errid&&Lang.isFunction(dterr)){dterr(dayfield);}var obj=Dom.get('calendar_hidden_'+calendarid);if(obj){obj.value=1;if(obj.errid&&Lang.isFunction(dterr)){dterr(obj);}}}calmenu.hide();});calmenu.show();}Event.addListener('calendarbutton-'+calendarid,'click',calbuttonclick,calendarid);Event.addListener(document,'click',function(e){var targ=Event.getTarget(e),calcon=Dom.get('calmenucontainer');if(targ&&calcon&&targ!=calcon&&targ.id.indexOf('calendarbutton-')==-1&&!Dom.isAncestor(calcon,targ)&&calcon.hidden_state==true){calcon.hide();}});});}function input_focus_event(){if(this.value==this.firstValue){this.value='';}}function input_blur_event(){if(this.value==''){this.value=this.firstValue;}}function input_focus_register(inputid,firstValue){var inputobj=Dom.get(inputid);if(inputobj&&inputobj.value.length>0){if(!inputobj.firstValue){inputobj.firstValue=firstValue||inputobj.value;}Event.on(inputobj,'focus',input_focus_event,inputobj,true);Event.on(inputobj,'blur',input_blur_event,inputobj,true);}}function fetch_xml_node(xmlnode,tagname){var node=Dom.getElementsBy(function(){return true;},tagname,xmlnode);if(node&&node[0]&&node[0].firstChild){return node[0].firstChild.nodeValue;}return null;}function pagenav_init_ajax(container,onloadfn){}Yonca.domready_register(function(){if(typeof $!='undefined'&&Lang.isFunction($('a.lightbox').lightBox)){$(function(){$('a.lightbox').lightBox();});}if(!CP_AREA){pagenav_init_ajax('content_body');}var logos=Dom.getElementsBy(__true_function,'li','subpage_logos');for(var i=0;i<logos.length;i++){Dom.setStyle(logos[i],'overflow','hidden');if(logos[i].offsetWidth<logos[i].scrollWidth){Event.on(logos[i],'mouseover',function(e){Dom.setStyle(this,'position','relative');Dom.setStyle(this,'zIndex','999');Dom.setStyle(this,'overflow','');});Event.on(logos[i],'mouseout',function(e){Dom.setStyle(this,'position','static');Dom.setStyle(this,'zIndex','');Dom.setStyle(this,'overflow','hidden');});}else{Dom.setStyle(logos[i],'overflow','');}}});function emailregister(){var email=Dom.get('registeremail'),reg=/^[a-z0-9.!#$%&\'*+-\/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>@,;]+\.+[a-z]{2,6}))$/i;if(!email||!email.value||email.value.length==0||trim(email.value)==''||!trim(email.value).match(reg)){alert('Geçersiz Mail Adresi');return false;}basic_async_request('index.php?do=register&email='+trim(email.value),function(o){alert('İşleminiz Başarıyla Gerçekleştirildi.\nİlginiz için teşekkE ederiz.')});}var CTRLKEY=1,SHIFTKEY=2,ALTKEY=4,__KEYSTOCK=new Array(),__ONCTRL=false,__ONSHIFT=false,__ONALT=false;function key_register(keyoption,keychar,regfunction){if(!(keyoption&(CTRLKEY|SHIFTKEY|ALTKEY))){return false;}if(Lang.isUndefined(__KEYSTOCK[keyoption])){__KEYSTOCK[keyoption]=new Array();}else if(!Lang.isUndefined(__KEYSTOCK[keyoption][keychar])){return false;}keychar=tlc(keychar);regfunction=Lang.isFunction(regfunction)?regfunction:function(){window.location=regfunction;};__KEYSTOCK[keyoption][keychar]=regfunction;}Event.addListener(document,'keydown',exec_keys);Event.addListener(document,'keyup',restore_keys);function exec_keys(e){var keycode=e.keyCode?e.keyCode:e.which;switch(keycode){case 17:__ONCTRL=true;break;case 16:__ONSHIFT=true;break;case 18:__ONALT=true;break;default:var keyoption=0,keychar=tlc(String.fromCharCode(keycode));if(__ONCTRL){keyoption=keyoption|CTRLKEY;}if(__ONSHIFT){keyoption=keyoption|SHIFTKEY;}if(__ONALT){keyoption=keyoption|ALTKEY;}if(keyoption>0){if(!Lang.isUndefined(__KEYSTOCK[keyoption])&&Lang.isFunction(__KEYSTOCK[keyoption][keychar])){Event.preventDefault(e);__KEYSTOCK[keyoption][keychar](e);}}}}function restore_keys(e){var keycode=e.keyCode?e.keyCode:e.which;switch(keycode){case 17:__ONCTRL=false;break;case 16:__ONSHIFT=false;break;case 18:__ONALT=false;break;}}function faq_visibility(faqid){var more=Dom.get('faq_question_all_'+faqid),less=Dom.get('faq_answer_'+faqid);var moretext=more.innerHTML,lesstext=less.innerHTML;less.innerHTML=moretext;more.innerHTML=lesstext;}function register_newproduct(productid){var product_fn=function(){var dc=document.createElement('div');dc.id='newproduct_block_img_'+productid;dc.className='newproduct';document.body.insertBefore(dc,document.body.firstChild);product_resize(dc);};var product_resize=function(dc){dc=dc||Dom.get('newproduct_block_img_'+productid);var coords=Dom.getXY(productid),obj=Dom.get(productid);coords[0]+=obj.offsetWidth-dc.offsetWidth;coords[1]-=Math.round((dc.offsetHeight-40)/2);Dom.setXY(dc,coords);};Event.on(window,'load',product_fn);Event.on(window,'resize',function(){setTimeout(function(){product_resize();},0);});}var wl=String(window.location).split('#')[1];if(wl&&(wl.match(/^\/[^\/.]+(\/[0-9]+)?(\/[^.\/]+)?\.html$/)||wl=='/')){window.location=HOMEURL+wl.substr(1);}function submitform(pressbutton){document.adminForm.action.value=pressbutton;try{document.adminForm.onsubmit();}catch(e){}document.adminForm.submit();}function isChecked(isitchecked){if(isitchecked==true){document.adminForm.boxchecked.value++;}else{document.adminForm.boxchecked.value--;}}function checkAll(n,fldName){if(!fldName){fldName='cb';}var f=document.adminForm;var c=f.toggle.checked;var n2=0;for(i=0;i<n;i++){cb=eval('f.'+fldName+''+i);if(cb){cb.checked=c;n2++;}}if(c){document.adminForm.boxchecked.value=n2;}else{document.adminForm.boxchecked.value=0;}}var xtarih="";function tarihDegistir(tarih){if(document.getElementById("tarihce"+tarih)!=null){document.getElementById("tarihce1994").style.display="none";document.getElementById("tarihceBaslik").style.display="block";document.getElementById("tarihceBaslik").innerHTML=tarih;document.getElementById("tarihce"+tarih).style.display="block";if(xtarih!="")document.getElementById("tarihce"+xtarih).style.display="none";xtarih=tarih;}}
