/**
	Uniwits System, 2011
	http://www.uniwits.com
**/ function adjust_mainfooter() { var mainfooter_div_obj=document.getElementById('mainfooter_div'); var maincontentregionsizer=document.getElementById('maincontentregionsizer'); var windowHeight=UNIWITS.Toolbox.clientHeight(); var mfPos=UNIWITS.Toolbox.absPos(mainfooter_div_obj); var minVacantHeight=0; vacantHeight=windowHeight-mfPos.y-mainfooter_div_obj.offsetHeight+maincontentregionsizer.offsetHeight; try { if (MIN_MAINFOOTER_VACANT_HEIGHT) minVacantHeight=MIN_MAINFOOTER_VACANT_HEIGHT; } catch (e) {} if (vacantHeight<minVacantHeight) vacantHeight=minVacantHeight; if (vacantHeight>0) { maincontentregionsizer.style.height=vacantHeight-2+"px"; maincontentregionsizer.style.display=''; } else if (vacantHeight<=0) maincontentregionsizer.style.display='none'; } UNIWITS.Toolbox.installWrapperEvent(window,'onload',function () { setTimeout("adjust_mainfooter()",20); } ); UNIWITS.Toolbox.installWrapperEvent(window,'onresize',function () { adjust_mainfooter(); } ); var xhr_test_speed=null; var test_speed_time_start; function test_speed() { test_speed_time_start=(new Date()).getTime(); var onreply; eval("onreply=function(){ test_speed_replied(); }"); if (!xhr_test_speed) xhr_test_speed=UNIWITS.Toolbox.getXMLHttpRequest(onreply); var url="/speedtest.php?l="+(Math.floor((Math.random()*10)+1)*2000); xhr_test_speed.open('GET',url,true,null,null); xhr_test_speed.send(null); } function test_speed_replied() { if (xhr_test_speed.readyState!=4 || xhr_test_speed.status!=200) return; var test_speed_time_end=(new Date()).getTime(); var xhr=UNIWITS.Toolbox.getXMLHttpRequest(function(){}); var url="qx-cmd-report.speedtest-l-"+xhr_test_speed.responseText.length+"-ms-"+(test_speed_time_end-test_speed_time_start)+".html"; xhr.open('GET',url,true,null,null); xhr.send(null); } if (document.cookie.indexOf('uniwits_speed_test_done=1')<0) window.setTimeout("test_speed()",3000); 
