//页面跳转到指定URL
function js_jump_url(){
	top.location.href = arguments[0];
}

function showCheckCode() {
			var content = '<input class="txtInput" name="code" id="form_code" type="text" size="6" maxlength="4" onblur="_Check(this)"><img src="/Public/Image/image.php?'+Math.random()+'" width="100" align="absmiddle" height="30" id="checkCode" onclick="javascript:this.src=\'/Public/Image/image.php?\'+Math.random();" />';
			document.getElementById('checkCodeContainer').innerHTML= content;
	}

//判断是指定对象的value是否为空
function check_text_value(text)	{
	if (text.value=="")	{
		return false;
	}
	else	{
		return true;
	}
}
//判断当前值是否为空
function check_blank(value)	{
	if (value=="")	{
		return true;
	}
	return false;
}
//提示是否确认当前操作
function check_del(text)	{
	if (text==null)	{
		text="删除";
	}
	if (confirm("是否确认"+text))	{
		return true;
	}
	return false;
}

//执行style的显示隐藏状态切换
function proc_style_display(obj,status)	{
	obj=document.all[obj];
	obj.style.display=status;
}
function switch_style_display(obj)	{
	obj=document.all[obj];
	if (obj.style.display=="none")
		obj.style.display="";
	else
		obj.style.display="none";
}



//以下为复制相应代码到剪贴板操作
var s1 = "已经复制到剪贴板，请使用键盘“Ctrl＋V”粘贴到QQ/MSN/BLOG/BBS中";
var s2 = "已经复制到剪贴板, 您可以通过您的BLOG发布评论";
var s3 = "已经复制到剪贴板, 您可以使用该RSS Feed订阅";
var s4 = "已经复制到剪贴板, 您可以直接使用该视频在您的BLOG或论坛中";

function copyHTML(s,title) {		
	var sContent = "<a href='"+s+"' title='更多信息,请访问这里'>"+title+"</a>";
	copyit(sContent, s1);
}

function copyUBB(s,text) {
	var sContent = "[URL="+s+"]"+text+"[/URL]";
	copyit(sContent, s1);	
}

function copyTB(s) {
	copyit(s, s2);	
}

function copyURL(s) {					
	copyit(s, s1);	
}

function copyRSS(s) {					
	copyit(s, s3);	
}

function copyVideo(s) {					
	copyit(s, s4);
}

function copyit(text, desc) {
	window.clipboardData.clearData();
	window.clipboardData.setData("text",text);	
	alert(desc);
}

function show_modi_tag(i_id)	{
	window.open ("index.php?modules=show_modi_tag&i_id="+i_id, "show_modi_tag", "height=600, width=800, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");
}

function write_var(msg_i)
{
		document.write(eval(msg_i));
}

function check_Kindergartensubmit(){
	inputCode = document.getElementById("form_code").value;
	if(inputCode.length == 4){
		return check_Kindergarten();
	}else{
		return false;
	}
}
