function getStyleObject(objectId) { // cross-browser function to get an object's style object given its id if(document.getElementById && document.getElementById(objectId)) { // W3C DOM return document.getElementById(objectId).style; } else if (document.all && document.all(objectId)) { // MSIE 4 DOM return document.all(objectId).style; } else if (document.layers && document.layers[objectId]) { // NN 4 DOM.. note: this won't find nested layers return document.layers[objectId]; } else { return false; } } // getStyleObject function changeObjectVisibility(objectId, newVisibility) { // get a reference to the cross-browser style object and make sure the object exists var styleObject = getStyleObject(objectId); if(styleObject) { styleObject.visibility = newVisibility; return true; } else { // we couldn't find the object, so we can't change its visibility return false; } } // changeObjectVisibility function moveObject(objectId, newXCoordinate, newYCoordinate) { // get a reference to the cross-browser style object and make sure the object exists var styleObject = getStyleObject(objectId); if(styleObject) { styleObject.left = newXCoordinate; styleObject.top = newYCoordinate; return true; } else { // we couldn't find the object, so we can't very well move it return false; } } // moveObject var Alta = "http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&kl=XX&q=host:ic.polyu.edu.hk+"; var url =""; var txt=""; function GoSearch(item) { txt = escape(item.text.value); url = Alta + txt + "&mode=and"; resultsWin = open("","results"); resultsWin.location = url; } function placeFocus() { document.FormSearch.text.focus(); } var hex_chr = "0123456789ABCDEF"; function hex(num) { var str = ""; for(var j = 4; j >= 0; j--) { str += hex_chr.charAt((num >>> (j * 4)) & 0x0F); } len = str.length; return "%" + str.substring((len - 2),len); } function toUTF8(tchar) { var k = 0; var str = ""; var mask = 0; var pattern = 0; if (tchar < 0x80) { k = 0; } else if ((tchar > 0x7F) && (tchar < 0x800)) { k = 1; } else if ((tchar > 0x7FF) && (tchar < 0x10000)) { k = 2; } else if ((tchar > 0xFFFF) && (tchar < 0x200000)) { k = 3; } else if ((tchar > 0x1FFFFF) && (tchar < 0x4000000)) { k = 4; } else if ((tchar > 0x3FFFFFF) && (tchar <= 0x7FFFFFFF)) { k = 5; } for (i = 0; i < k; i++) { num = ((tchar >> (6 * i)) & 0xBF) | 0x80; str = hex(num) + str; } if (k == 1) { mask = 0xDF; pattern = 0xC0; } else if (k == 2) { mask = 0xEF; pattern = 0xE0; } else if (k == 3) { mask = 0xF7; pattern = 0xF0; } else if (k == 4) { mask = 0xFB; pattern = 0xF8; } else if (k == 5) { mask = 0xFD; pattern = 0xFC; } if (k > 0) { num = ((tchar >> (6 * k)) & mask) | pattern; str = hex(num) + str; } else { str = hex(tchar); } return str; } function encode(val) { var len = val.length; var i = 0; var newStr = ""; for (i=0;i800 ? imgheight=120:imgheight=120 window.screen.width>800 ? imgleft=10:imgleft=10 function myLeftLoad() { cl_style.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight-20; cl_style.style.left=imgleft; //cl_stylebig.style.top=document.body.scrollTop + top_F +1; //cl_stylebig.style.left = left_F>=0?left_F:(document.body.offsetWidth - sWidth_F)/2; setTimeout("myLeftLoad();",50); } document.ns = navigator.appName == "Microsoft Internet Explorer" function openWin(){ if(document.ns){ myLeftLoad(); var playCnt; var set_counter=amt(playCnt,"cntOf" + document.URL); if(set_counter==1) { if(v_flag == "f") { cl_style.style.visibility='hidden'; cl_stylebig.style.visibility='visible'; } else { cl_style.style.visibility='visible'; cl_stylebig.style.visibility='hidden'; } } else { cl_style.style.visibility='visible'; cl_stylebig.style.visibility='hidden'; //if(ban_flag==0) //{ // cl_style.style.visibility='visible'; // cl_stylebig.style.visibility='hidden'; //} //else //{ // cl_style.style.visibility='hidden'; // cl_stylebig.style.visibility='visible'; //} } //alert(set_counter); } } var v_flag; var sIe=false; var sSwf=(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if (sSwf) sSwf=parseInt(sSwf.description.substring(sSwf.description.indexOf(".")-1)) >= 6; else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && navigator.userAgent.indexOf("Windows")>=0) { var sIe=true; document.write('