
function sml(cn){
	content = " [<A href=\"javascript:showModalScreen('" + "http://club.tom.com/fri_mes/index.php?url=sm&receiver=" + cn + "&sendby=1" + "',isLogin);\">发送留言</A>] ";
	document.write(content);
}


function sel(cn,t){
	if(m == 1 || ise == 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 + "\r\n";
	content+= titleUrl;


	window.clipboardData.setData("Text",content);
}

function sn(n,nl){
	if(n == '手机用户'){
		document.write("<span style='cursor:pointer;' title='本版支持手机访问'>" + n + "</span>" + "<img style='cursor:pointer;vertical-align:top;margin-top:-2px;' src='/images/mobile.gif' title='本版支持手机访问'/>");
	}else{
		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("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 - 370;		//计算图片初始宽度

/* 判断阅览器类型 */
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;
		}
	}*/
	if(obj.width > 600){
		obj.width = 600;
	}
	
	obj.title = "点击看大图";
}
