
function sml(cn){
	content = " [<A href=\"javascript:showModalScreen('" + "/messageproxy.php?cn=" + cn + "',isLogin);\">发送留言</A>] ";
	document.write(content);
}


function sel(cn,t){
	if(m == 1 || ccn == cn){
		document.write(" [<a href='/editThread.php?f=" + f + "&t=" + t + "'>修改</a>] ");
	}
}

function go(forumid,a,n,t){
	window.location.href = "item_" + forumid + "_" + a + "_" + (n-1) + "_" + t + ".html";
	return false;
}

function copyUrl(url){
	var content='';
	content+=url;
	content+= "\r\n" + titleUrl;


	window.clipboardData.setData("Text",content);
}

function sn(n,nl){
	document.write("<a href='" + nl + "' target=_blank>" + n + "</a>");
}

document.onkeydown=nextpage;
function goPre(){
	window.location.href = prePage;
}
function goNext(){
	window.location.href = nextPage;

}

function quickPost(){
	document.getElementById("replyform").subBtn.click();
}

function nextpage(event) {
	event = event ? event : (window.event ? window.event : null);
	targetObject = event.srcElement || event.target;
	if(targetObject.tagName != "TEXTAREA"){
		if (event.keyCode==37) goPre();
		if (event.keyCode==39) goNext();
	}
	if (event.keyCode==13 && event.ctrlKey == true) quickPost();
	if (event.keyCode==83 && event.altKey == true) quickPost();

}

//var initWidth = screen.width - 345;		//计算图片初始宽度
var initWidth = 640;

/* 判断阅览器类型 */
var ua = window.navigator.userAgent;
var ie = /msie/ig.test(ua);
var ie55up = /msie (5\.5|6)/ig.test(ua);

function pic_width(obj) {
	obj.border = 0;
	if(obj.width > initWidth) {
		if(ie) {
			zoom = (initWidth / obj.width) * 100;
			obj.style.zoom = zoom + "%";
		} else {
			obj.width = initWidth;
		}
	}
}

function dos(){
	
	var tfObj = document.getElementById("tf");
	var sfObj = document.getElementById("sf");
	if(tfObj.selectedSearch.value == "t"){
		sfObj.f.value = "title";
	}else{
		sfObj.f.value = "username";
	}
	sfObj.q.value = tfObj.st.value;
	sfObj.action = 'http://bbs.eachnet.com/search.php';
	sfObj.submit();
	return false;
}
