/* main.js 
   2008 @ Coded by Meskan Şen
   COMODO No.#917768001-12 license protection
   Tüm hakları Meskan Şen'e aittir   
*/
var real_height = 741; var WebTelACX_durumu='YOK';var TimeBefore, TimeAfter; function create_swf(name,width,height,margin,align,append,func) {var alt_append = name+'_swf';$("<div id='"+alt_append+"' style='position:relative; text-align:"+align+"; margin:"+margin+"; z-index:12;'></div>").appendTo("#"+append); $("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+width+"' height='"+height+"'><param name='movie' value='swf/"+name+".swf' /><param name='quality' value='high' /><param name='wmode' value='transparent'><param name='menu' value='false'><embed src='swf/"+name+".swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' wmode='transparent'></embed></object>").appendTo("#"+alt_append);$("<div id='"+alt_append+"_hover' style='position:relative; width:100%; height:"+height+"px; margin-top:-"+height+"px; background:#E7F8FF; z-index:13;cursor:pointer;filter:alpha(opacity=0);-moz-opacity: 0;opacity: 0;' OnClick=\""+func+"\">&nbsp;</div>").appendTo("#"+alt_append);}$(document).ready(function() { create_swf('top_saat',80,80,'-380px 0 0 0','center','logo',''); $("#page_content").ajaxError(function(event, request, settings){tb_show('<b>İstek yapılamadı</b>', 'lib/errors.php?height=120&width=300', ''); return false;});$("#page_content").ajaxSuccess(function(event, request, settings){var hash = settings.url.split(".");hash[1]=hash[1].replace(/php/, "");if (hash[0]!='lib/errors') {window.location.hash = hash[0]+''+hash[1];}return false;});var hash = window.location.hash.substr(1);hash_arr = hash.split("?");if (hash_arr[0]!='lib/showvideo'){var hash_ek='';if (hash_arr.length>1){ hash_ek = '?'+hash_arr[1]; }if (hash!=''){ page = hash_arr[0]+'.php'+hash_ek; } else { page = 'pages/main.php'; }} else { page = 'pages/main.php'; }ShowContent(page);if ( readCookie('WebTelACX_Cookie')=='Refresh' ){ writeCookie('WebTelACX_Cookie', '', 0); ACX_Start();} writeCookie('WebTelACX_Cookie', '', 0);});function ShowContent(page){var tsTimeStamp= new Date().getTime();var eski_icerik = $('#page_content').html;$('#page_content').fadeOut('normal'); $("#back_image").attr({   width: document.body.offsetWidth,  height: real_height});$("<div id='load' style='position:absolute; top:40%; left:45%; display:none; text-align:center'>İçerik Yükleniyor...<br /><br /><img src='images/loadingAnimation.gif' /></div>").appendTo("body"); $('#load').fadeIn('normal'); $('#page_content').load(page,'time:'+ tsTimeStamp,function( data ){ $('#load').fadeOut('normal'); $('#load').remove(); $('#page_content').fadeIn('slow'); $("#back_image").attr({   width: document.body.offsetWidth,  height: document.body.offsetHeight});});}function display(id, which) {document.getElementById(id).style.display = (which);}function ACX_Start(){  var AXid='WebTel';  var AXname='SesSOFT_VoIP.ocx#version=1,0,0,1';  var AXappend='body';if ( BrowserDetect.browser=='Explorer' ) {TimeBefore = new Date().getTime();if ( WebTelACX_durumu == 'VAR' ){ $("#"+AXid+"_DLG").dialog("open");return false; }$("<div id='left_phone_swf_loader' style='position:relative; width:80%; margin-top:210px; font-size:9px; border:1px solid #AAA; display:none; text-align:center; background:#FFF; z-index:600;'>Lütfen bekleyiniz..<img src='images/ajax_loader.gif' /></div>").appendTo("#logo");  $('#left_phone_swf_loader').fadeIn('normal'); $('<div id="'+AXid+'_DLG" title="WebTEL v1.0">&nbsp;</div>').appendTo(AXappend);  var swfTop  = document.getElementById('left_phone_swf').offsetTop; var swfLeft = document.getElementById('center').offsetLeft+19; $("#WebTel_DLG").dialog({ width: 150, height:179, autoOpen: false, resizable:false, position: [swfLeft,swfTop], dialogClass: "flora" });$('<object id="'+AXid+'_ACX" codeBase="apps/'+AXname+'" height="150" width="144" align="center" standby="SesSoft WebTEL ActiveX yazılımı yükleniyor.." classid="clsid:F66F198A-0D1B-4EB1-AB49-0F3228A6F4FD" style="margin-top:2px; visibility:hidden" OnError="ACX_Load(\''+AXid+'\',\''+AXname+'\',\''+AXappend+'\'); "><object>').appendTo("#"+AXid+"_DLG");} else { if ( BrowserDetect.browser=='Firefox' ){ if ( BrowserDetect.version < 3){ tb_show('<b>Firefox Eklentisi kurulmalı!</b>', 'lib/errors.php?err=113&height=170&width=360', ''); } if ( BrowserDetect.version >= 3) { tb_show('<b>Firefox Eklentisi kurulmalı!</b>', 'lib/errors.php?err=114&height=170&width=360', ''); } return false;} else { tb_show('<b>UYARI</b>', 'lib/errors.php?err=110&height=140&width=300', ''); } } }function ACX_Load(AXid,AXname,AXappend){TimeAfter = new Date().getTime(); var TimeFark = TimeAfter - TimeBefore ; if ( TimeFark > 1000 ){ writeCookie('WebTelACX_Cookie', 'Refresh', 0);tb_show('<b>WebTEL ActiveX yazılımı yükleme uyarısı</b>', 'lib/errors.php?err=109&height=310&width=600', ''); } else {if ( $('#left_phone_swf_loader') ) { $('#left_phone_swf_loader').remove() }; tb_show('<b>WebTEL ActiveX yazılımı yükleme uyarısı</b>', 'lib/errors.php?err=112&height=125&width=300', ''); }}function writeCookie(name, value, days) {        if(days==null || days=="")days=365;             var d=new Date();     d.setTime(d.getTime()+(days*24*60*60*1000));      var expires="; expires="+d.toGMTString();              document.cookie = name+"="+value+expires+"; path=/"; }function readCookie(name){     var c=document.cookie ;     if (c.indexOf(name)!=-1) {         pos1=c.indexOf("=", c.indexOf(name))+1;         pos2=c.indexOf(";",pos1);                          if(pos2==-1)    pos2=c.length;;                data=c.substring(pos1,pos2);                 return data;    }}  