function af_func(){}

af_func.prototype.ajax_upload=function(nsort,cid,return_func)			// 这里传入的返回函数为了防止意外，必需用base64加密一次
{
	setTimeout("displayfadeinbox()",100);
	GetAjaxInfo('/manage/ajax_upload.php','upload',cid,nsort,return_func);
}
// 删除确认,msg为信息,url为确认后跳转的地址,child为运行的地方，如果为true则为本窗口
af_func.prototype.delete_true=function(msg,url,child)
{
	if(child==undefined || child=='') child="mainFrame";
	if(confirm(msg))
	{
		if(child === true)
			window.location.href=url;
		else
		{
			window.frames[child].location.href=url;
		}
	}
}
// 区域打印
af_func.prototype.DoPrintNow=function(div_id)
{
	var newwin=window.open('','',"height=580,width=770,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,status=no");
	newwin.opener = null;
	newwin.document.write("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><link href=\"/skin/default/css/main.css\" type=\"text/css\" rel=\"stylesheet\"></head><body><div style=\"background-color:#FFFFFF\">");
	newwin.document.write(GE(div_id).innerHTML);
	newwin.document.write("</div></body></html>");
	newwin.document.close();
	newwin.window.print();
	newwin.close();
}
// 跳转,如果有target则为相应的框架执行,否则为当前窗口
af_func.prototype.gotourl=function(url,target)
{
	if(target=='undefined' || target=='')		// 当前窗口
		window.location.href=url;
	else
		window.frames[target].location.href=url;
}

var func = new af_func();
