function expandCollapse(cmd_type){var direction=(cmd_type=='open')?1:2;var heightCur=(cmd_type=='open')?parseInt(heightsize):heightSizeClose;if(document.getElementById){divs=document.getElementById('topads');if(divs){if(cmd_type=='open'){slideStart('topads',heightCur,direction);}else if(cmd_type=='close'){slideStart('topads',heightCur,direction);}}}}
var StepPx=1;var StepMs=10;var t=1;var isSliding=false;function slideStart(objID,toHeight,direction){if(isSliding)return;slideObj(objID,toHeight,direction);}
function slideObj(objID,toHeight,direction){isSliding=true;var obj=document.getElementById(objID);var curHeight=parseInt(obj.style.height);if(direction==1){if(curHeight>=toHeight){isSliding=false;t=1;return;}
obj.style.height=(curHeight+fn(t)*StepPx)+"px";}else{if(curHeight<=toHeight){isSliding=false;t=1;return;}
obj.style.height=(curHeight-fn(t)*StepPx)+"px";}
t++;setTimeout("slideObj('"+objID+"',"+toHeight+","+direction+")",StepMs);}
function fn(x){return x;}
function bannerbug(obj,islem){var nAgt=navigator.userAgent;if(nAgt.indexOf("MSIE")==-1){if(document.getElementById){if(islem=='open'){divs=document.getElementById(obj);divs.style.visibility='';}
if(islem=='close'){divs=document.getElementById(obj);divs.style.visibility='collapse';}}}}
function _utf8_encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c& 63)|128);}
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)& 63)|128);utftext+=String.fromCharCode((c& 63)|128);}}
return utftext;}
