
function bgInit(){
	var box_w = document.getElementById("box_w");
	if (!box_w){		
		if(!jQuery.browser.msie || document.readyState=="complete"){
			var message = document.createElement("div");
			message.style.display = "none";
			message.setAttribute("id","box_w");
			jQuery('body').append(message);
		} else {
			setTimeout("bgInit()",500);
		}
	}
}


function initNM(){	
	if(!jQuery.browser.msie || document.readyState=="complete"){
		var noticeM = document.getElementById("noticeM");
		if (noticeM){
				$(noticeM).Resizable(
					{
						dragHandle: '#noticeMTop',
						handlers: {
						},
						onResize : function(size, position) {
						}
					}
				);
		} else {
			setTimeout("initNM()",500);
		}
	} else {
		setTimeout("initNM()",500);
	}
}

function closeNM(){
	//hideBG();
	document.getElementById("noticeM").style.display = "none";
}

function showNM(id){
//showBG();
pageSize = jQuery.iUtil.getScroll();
jQuery('#noticeM').css(
		{
			display		: '',
			left	: (pageSize.iw - 340)/2 + 'px',
			top		: (pageSize.ih)/2 + pageSize.t - 100 + 'px'
		}
);
$.ajax({
	type:"GET",
	url:"/txtNotice.jsp?id="+id,
	success:function(msg){
		var mesg = "" + $.trim(msg);
		var msgs = mesg.split("@#@");
		if (msgs.length > 2){
			jQuery('#noticeMType').html(msgs[0]);
			jQuery('#noticeMTitle').html(msgs[1]);
			jQuery('#noticeMContent').html(msgs[2]);
		}	
	}
});
}

function initJM(){	
	if(!jQuery.browser.msie || document.readyState=="complete"){
		var noticeM = document.getElementById("join");
		if (noticeM){
				$(noticeM).Resizable(
					{
						dragHandle: '#joinTop',
						handlers: {
						},
						onResize : function(size, position) {
						}
					}
				);
		}
	} else {
		setTimeout("initJM()",500);
	}
}

function closeJM(){
	//hideBG();
	document.getElementById("join").style.display = "none";
}

function showJM(){

if (!logined){
	alert("朋友，没有登录报不了名，请您登录后报名。");
	return;
}else{	window.open("/woJoin.jsp", "_blank" );}/*
//showBG();
pageSize = jQuery.iUtil.getScroll();
$.ajax({
	type:"GET",
	url:"/txtWoLoad.jsp?rn="+ new Date().getTime(),
	success:function(msg){
		var mesg = "" + $.trim(msg);
		var msgs = mesg.split("@#@");
		//alert("msgs[2]="+msgs[2]);
		if (msgs.length > 2){
			//alert(msgs[2]);
			jQuery('#joinId').val(msgs[0]);
			jQuery('#nickName').val(msgs[1]);
			jQuery('#pathId').val(msgs[2]);
			jQuery('#spname').val(msgs[3]);
			jQuery('#mbrStyle').attr({src: msgs[2]});
		}	
	}
});

jQuery('#join').css(
		{
			display		: '',
			left	: (pageSize.iw - 340)/2 + 'px',
			top		: (pageSize.ih)/2 + pageSize.t - 100 + 'px'
		}
);*/

}

function submit_joinJM(){
	var path = jQuery('#pathId').val();
	var intro = jQuery('#intro').val();
	var spname = jQuery('#spname').val();
	if (path=='') {
		return;
	}
	$.ajax({
		type:"POST",
		url:"/txtWoJoin.jsp",
		data: "path="+path+"&intro="+intro+"&spname="+spname,
		success:function(msg){	
			var mesg = $.trim(msg);
			if (mesg.indexOf("success")!=-1){
				//logSuccess(mesg.substring(8));
				alert('提交成功！');
				closeJM();
			} else {		
				alert(mesg.substring(5));
			}
		}
	});
}

function showCM(id,e){
	pageSize = jQuery.iUtil.getScroll();
	pointer = jQuery.iUtil.getPointer(e);
//pageSize = jQuery.iUtil.getScroll();
//alert("x:"+pointer.x+",y:"+pointer.y);
$.ajax({
	type:"GET",
	url:"/txtCloth.jsp?id="+ id,
	success:function(msg){
		var mesg = "" + $.trim(msg);
		var msgs = mesg.split("@#@");
		if (msgs.length > 2){
			//alert(msgs[2]);
			jQuery('#cloth').html(msgs[0]);
			jQuery('#cloth1').html(msgs[1]);
			jQuery('#cloth2').html(msgs[2]);
			jQuery('#cloth3').html(msgs[3]);
			jQuery('#cloth4').html(msgs[4]);
			jQuery('#cloth5').html(msgs[5]);
			jQuery('#cloth6').html(msgs[6]);
			jQuery('#clothAll').html(msgs[7]);
			jQuery('#clothIntro').html(msgs[8]);
		}	
	}
});
	jQuery('#clothes').css(
			{
				display		: '',
				left	: pointer.x - 340 + 'px',
				top		: pointer.y - 180 + 'px'
			}
	);
}

function initGif(){
	if(!jQuery.browser.msie || document.readyState=="complete"){
		var gifB = document.getElementById("giftBox");
		if (gifB){
				$(gifB).Resizable(
					{
						dragHandle: '#giftBoxTop',
						handlers: {
						},
						onResize : function(size, position) {
						}
					}
				);
		}
	} else {
		setTimeout("initGif()",500);
	}
}

function showGif(con,title){
var tit = "";
if (title) tit = title;
$('#giftTitle').html(title);
$('#giftBoxCenter').html(con);
pageSize = jQuery.iUtil.getScroll();
	jQuery('#giftBox').css(
			{
				display		: '',
				left	: (pageSize.iw - 340)/2 + 'px',
				top		: (pageSize.ih)/2 + pageSize.t - 100 + 'px'
			}
	);
}

function closeGif(){
	document.getElementById("giftBox").style.display = "none";
}

