var xmlhttp;var xmlhttpcom;document.onkeydown=NavigateThrough;function NavigateThrough(event){if(!document.getElementById) return; if(window.event) event=window.event; var el; if(event.ctrlKey){var link=null; switch(event.keyCode ? event.keyCode: event.which ? event.which: null){case 0x25: el=document.getElementById('prevurl'); if(el!=null && el.href!="nourl"){updatetop(el.href);} break; case 0x27: el=document.getElementById('nexturl'); if(el!=null && el.href!="nourl"){updatetop(el.href);} break; case 0x26: el=document.getElementById('topurl'); if(el!=null && el.href!="nourl"){updatetop(el.href);} break; case 0x28: el=document.getElementById('downurl'); if(el!=null && el.href!="nourl"){updatetop(el.href);} break; case 0x24: link=document.getElementById('homeurl'); if(link && link.href) document.location=link.href; break;}}}function getHTTPRequestObject(){var xmlhttp; try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");} catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");} catch(E){xmlhttp=false;}} if(!xmlhttp && typeof XMLHttpRequest!='undefined'){xmlhttp=new XMLHttpRequest();} return xmlhttp;}function StateChanged(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var el=document.getElementById("mblock"); if(el!=null){var xmlDoc=xmlhttp.responseXML.documentElement; el.innerHTML=xmlDoc.getElementsByTagName("topxhtml")[0].firstChild.nodeValue; resetthumbs(xmlDoc.getElementsByTagName("newid")[0].firstChild.nodeValue );} el=document.getElementById('prevurl'); var els=xmlDoc.getElementsByTagName("prevurl"); if(el!=null){if(els !=null && els.length>0 && els[0].firstChild!=null){el.href=els[0].firstChild.nodeValue;}else{el.href="sof";}} el=document.getElementById('nexturl'); els=xmlDoc.getElementsByTagName("nexturl"); if(el!=null){if(els !=null && els.length>0 && els[0].firstChild!=null){el.href=els[0].firstChild.nodeValue;}else{el.href="eof";}} var wh=0; if(typeof(window.innerWidth )=='number' ){wh=window.innerHeight;} else if(document.documentElement && document.documentElement.clientWidth ){wh=document.documentElement.clientHeight;} else if(document.body && document.body.clientWidth ){wh=document.body.clientHeight;} if(wh > 755){window.location.hash="head";}else{window.location.hash="data";}}}}function StateChangedCom(){if(xmlhttpcom.readyState==4){if(xmlhttpcom.status==200){var el=document.getElementById("com"); if(el!=null){el.innerHTML=xmlhttpcom.responseXML.documentElement.getElementsByTagName("xhtmldata")[0].firstChild.nodeValue;}}}}function resetthumbs(newid){var els=document.getElementsByTagName("ins"); var l=els.length; for(i=0;i<l;i++){if(els[i].className=="cthumb"){els[i].className="thumb";}} var el=document.getElementById(newid); if(el!=null){el.className="cthumb";}}function updatetop(urllink){xmlhttp=getHTTPRequestObject(); if(xmlhttp){xmlhttp.onreadystatechange=StateChanged; xmlhttp.open("GET",urllink,true); xmlhttp.send(null);}}function updaterep(urllink){xmlhttpcom=getHTTPRequestObject(); if(xmlhttpcom){xmlhttpcom.onreadystatechange=StateChangedCom; xmlhttpcom.open("GET",urllink,true); xmlhttpcom.send(null);}}

