function getWidth(){return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth};
function getHeight(){return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight};
function mod_url(u,h){if(h!=null){h=u.hash}else{h=""};var np=u.pathname+'?';np=np.substring(0,np.indexOf('?'));
if(np.substring(0,1)=="/"){np=np.substring(1,np.length)};return u.protocol+'/'+'/'+u.hostname+'/'+np+'?'+Math.round(Math.random()*10000)+h};
function new_win(u,w,h,s,t){if(t==null||t==""||t==" "){t='-'};w=w+40;h=h+70;var x=(getWidth()-w)/2;if(x<0){x=0}
w1=window.open('nw.php?t='+encodeURIComponent(t)+'&u='+u,'_blank','menubar=0,status=0,width='+w+',height='+h+',top=20,left='+x);w1.focus()}
function setup(){var sh=getHeight();var sw=getWidth();var p_y=(sh-70);var p_x=Math.round(p_y*4);if(p_x>sw-100){p_x=(sw-120);p_y=(sh-85)};
$("a.ajax").fancybox({'overlayShow':true,'overlayOpacity':0.5,'frameWidth':p_x,'frameHeight':p_y});
$("a.fbc").fancybox({'zoomOpacity':true,'overlayShow':true,'overlayOpacity':0.3,'zoomSpeedIn':600,'zoomSpeedOut':400,'frameWidth':p_x,'frameHeight':p_y});
$.ajaxSetup({'beforeSend':function(x){x.setRequestHeader("Accept","text/html/ajax")}})};
