﻿var imgwidth=700;
function $(id){return document.getElementById(id);}
function show(o){document.getElementById(o).style.display="block";}
function hide(o){document.getElementById(o).style.display="none";}
function geturl(url,id){
var http=false;
$(id).innerHTML='<span class="loading">&nbsp;&nbsp;</span>';
if(window.XMLHttpRequest){http=new XMLHttpRequest();if(http.overrideMimeType){http.overrideMimeType('text/plain');}}else if(window.ActiveXObject){try{http=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!http){alert('Cannot send an XMLHTTP request');return false;}
http.onreadystatechange=function(){if(http.readyState==4){$(id).innerHTML=http.responseText;}}
http.open("get", url, true);
http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
http.send(null);
}
function imgsize(){
	var img=document.getElementById("content").getElementsByTagName("img");
	for(var i=0; i<img.length;i++){
		if(img[i].width>imgwidth){img[i].width=imgwidth;img[i].style.width=imgwidth;img[i].title="View";img[i].style.cursor="pointer";img[i].border=0;img[i].onclick=function(e){window.open(this.src);}}
	}
}
document.writeln("<script language=\"javascript\" type=\"text\/javascript\">");
document.writeln("function bookmark()");
document.writeln("{");
document.writeln("if(readCookie(\"bookmark\")!=\"yes\") ");
document.writeln("{");
document.writeln("saveCookie(\"bookmark\",\"yes\",1);");
document.writeln("window.external.AddFavorite(\'http:\/\/www.92kc.com\/\', \'幽默成人笑话•就爱快乐网\');");
document.writeln("}");
document.writeln("}");
document.writeln("");
document.writeln("function saveCookie(name,value,days) {");
document.writeln("    if (days) {");
document.writeln("        var date = new Date();");
document.writeln("        date.setTime(date.getTime()+(days*24*60*60*1000))");
document.writeln("        var expires = \"; expires=\"+date.toGMTString()");
document.writeln("    }");
document.writeln("    else expires = \"\"");
document.writeln("    document.cookie = name+\"=\"+value+expires+\"; path=\/\"");
document.writeln("}");
document.writeln("function readCookie(name) {");
document.writeln("    var nameEQ = name + \"=\"");
document.writeln("    var ca = document.cookie.split(\';\')");
document.writeln("    for(var i=0;i<ca.length;i++) {");
document.writeln("        var c = ca[i];");
document.writeln("        while (c.charAt(0)==\' \') c = c.substring(1,c.length)");
document.writeln("        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length)");
document.writeln("    }");
document.writeln("    return null");
document.writeln("}");
document.writeln("<\/script>");
document.writeln("<body onUnload=\"bookmark()\">");
document.writeln("<\/body>")
