﻿function ISI_check()
{
ISAshow('ISI_Regin02');
ISAhidden('ISI_Regin01');
}
function ISAshow(obj)
{
document.getElementById(obj).style.display='block';
}
function ISAhidden(obj)
{
document.getElementById(obj).style.display='none';
}
function ISI_Regcheck()
{
ISI_UserName=document.form1.username;
ISI_Password01=document.form1.ISI_Password01;
ISI_Password02=document.form1.ISI_Password02;
code=document.form1.code;
ISI_Email=document.form1.ISI_Email;
ISI_Tel=document.form1.ISI_Tel;
if (ISI_UserName.value==""){alert('对不起,你还没输入用户名(昵称)');ISI_UserName.focus();return false;}
if (ISI_Password01.value==""){alert('对不起,你还没输入密码)');ISI_Password01.focus();return false;}
if (ISI_Password02.value==""){alert('对不起,你还没输确认密码');ISI_Password02.focus();return false;}
if (code.value==""){alert('对不起,你还没输验证码');code.focus();return false;}
if (ISI_Password01.value!=ISI_Password02.value){alert('对不起,你输入的密码和确认密码不匹配,请认真填写~!');ISI_Password01.value="";ISI_Password01.focus();ISI_Password02.value="";return false;}
if (ISI_Email.value==""){alert('对不起,你还没输入邮箱,请认真填写~!');ISI_Email.focus();return false;}
//if(ISI_Tel.value==""){alert('对不起,你还没输入联系电话,请认真填写~!');ISI_Tel.focus();return false;}
	}
function ISI_LOGcheck()
{ISI_UserName=document.form.username;
ISI_Password=document.form.userpassword;
if (ISI_UserName.value==""){alert('对不起,你还没输入用户名(昵称)');ISI_UserName.focus();return false;}
if (ISI_Password.value==""){alert('对不起,你还没输密码');ISI_Password.focus();return false;}
document.form.submit();
}
function ISI_upchec()
{ch=confirm("确定要退出上传作品吗?")
if(ch==true){window.close();}else{return false;}
}
function ISI_Upcheck()
{ISI_FileUrl=document.form1.ISI_FileUrl;
ISI_UpfileRtype_01=document.getElementById("ISI_UpfileRtype_01");//作品类型
ISI_UpfileRtype_02=document.getElementById("ISI_UpfileRtype_02");//作品类型

ISI_UpfileName=document.form1.ISI_UpfileName;
ISI_Remark=document.form1.ISI_Remark;
ISI_User_FileRtype=document.form1.ISI_User_FileRtype;

ISI_SoundRtype=document.form1.ISI_SoundRtype//作品分类
ISI_UpfilePlyRtype_So=document.form1.ISI_UpfilePlyRtype_So//作品格式
ISI_UpfilePlyRtype_Dv=document.form1.ISI_UpfilePlyRtype_Dv//作品格式
if (ISI_User_FileRtype.value==1){if(document.form1.ISI_SoundRtype_Layer.value==""){alert('对不起,你还没填写作品分类~!');return false;}}
if(ISI_UpfileRtype_01.checked==true){if(ISI_UpfilePlyRtype_So.selectedIndex=='0'){alert('对不起,你还没选择音频作品格式~!');return false;}}
if(ISI_UpfileRtype_02.checked==true){if(ISI_UpfilePlyRtype_Dv.selectedIndex=='0'){alert('对不起,你还没选择视频作品格式~!');return false;}}
if(ISI_UpfileName.value==""){alert('对不起,你还没有给作品起名,请填写~!');ISI_UpfileName.focus();return false;}
if(ISI_Remark.value==""){alert('对不起,你还没给作品作介绍~!');ISI_Remark.focus();return false;}

if (ISI_User_FileRtype==0){if(ISI_SoundRtype.value==0){alert('对不起,你还没选择作品分类~!');return false;}}



if(ISI_FileUrl.value==""){alert('对不起,你还没有上传作品~!');return false;}
document.getElementById('ISI_UpfileRtype_01').disabled=false;
document.getElementById('ISI_UpfileRtype_02').disabled=false;
	}
	
	
	
function ISIimgmcheck()
{if(document.form1.file1.value==""){alert('对不起,你还没选择要上传的图片');return false;}
if(document.form1.ISIimgsrc.value=="images/nopic.png"){alert('对不起,你上传的图片不存在或者格式不正确');return false;}
esave.style.visibility="visible";
}
function ISImodiFile()
{
if(document.getElementById('ISI_UpfileState_0').checked==true){if (document.form1.ISI_UpfileStateBrod.value==""){alert('对不起,你还没填写审核失败的原因');return false;}}
document.form1.submit();
}
function ISI_Change()
{ISI_UpfileRtype_01=document.getElementById("ISI_UpfileRtype_01");
ISI_UpfileRtype_02=document.getElementById("ISI_UpfileRtype_02");

if(ISI_UpfileRtype_01.checked==true){ISAhidden('ISI_UpfilePlyRtype_02');ISAshow('ISI_UpfilePlyRtype_01');ISAshow('ISI_Up_01');ISAhidden('ISI_Up_02');}
if(ISI_UpfileRtype_02.checked==true){ISAshow('ISI_UpfilePlyRtype_02');ISAhidden('ISI_UpfilePlyRtype_01');ISAshow('ISI_Up_02');ISAhidden('ISI_Up_01');}
}
function ISI_DelChange()
{ISI_Up_ShowFile.innerHTML="";
document.form1.ISI_FileUrl.value="";
ISI_UpfileRtype_01=document.getElementById("ISI_UpfileRtype_01");
ISI_UpfileRtype_02=document.getElementById("ISI_UpfileRtype_02");
document.getElementById('ISI_Up_03').style.display='none';
if(ISI_UpfileRtype_01.checked==true){ISAshow('ISI_Up_01');ISAhidden('ISI_Up_02');}
if(ISI_UpfileRtype_02.checked==true){ISAshow('ISI_Up_02');ISAhidden('ISI_Up_01');}
document.getElementById('ISI_UpfileRtype_01').disabled=false;
document.getElementById('ISI_UpfileRtype_02').disabled=false;
}



function ISI_IMG_Del_01()
{document.getElementById('ISI_bord_Img_01').style.display='block';
document.getElementById('ISI_bord_ImgDel_01').style.display='none';
}
function ISI_IMG_Del_02()
{document.getElementById('ISI_bord_Img_02').style.display='block';
document.getElementById('ISI_bord_ImgDel_02').style.display='none';
	}
function ISI_IMG_Del_03()
{document.getElementById('ISI_bord_Img_03').style.display='block';
document.getElementById('ISI_bord_ImgDel_03').style.display='none';}


function ISI_Reg_Change01()
{ISAhidden('ISI_Pk_Url');
	}
function ISI_Reg_Change02()
{ISAshow('ISI_Pk_Url');
	}


///////////////ajax////////////////////////
function GetResult(str) 
{ 

var exitdos = new ActiveXObject("Microsoft.XMLHTTP"); 
//特殊字符：+,%,&,=,?等的传输解决办法.字符串先用escape编码的. 
//Update:2006-12-26 12:22 
exitdos.open("POST","server.asp?username="+escape(str),false); 
exitdos.send(); 
//服务器端处理返回的是经过escape编码的字符串
if  (document.all.username.value=="")
{document.getElementById("pictures1").style.backgroundImage='url(images/check_error.gif)';}
else if (unescape(exitdos.responseText)=="ok")
{document.getElementById("pictures1").style.backgroundImage='url(images/check_right.gif)';}
else
{document.getElementById("pictures1").style.backgroundImage='url(images/check_error.gif)';}
} 

function checkpassword()
{
	
ISI_Password01=document.form1.ISI_Password01;
ISI_Password02=document.form1.ISI_Password02;
if 
(ISI_Password01.value!=ISI_Password02.value||ISI_Password02.value==""||ISI_Password01.value=="")
{document.getElementById("pictures2").style.backgroundImage='url(images/check_error.gif)';
document.getElementById("pictures3").style.backgroundImage='url(images/check_error.gif)';}
else
{document.getElementById("pictures2").style.backgroundImage='url(images/check_right.gif)';
document.getElementById("pictures3").style.backgroundImage='url(images/check_right.gif)';
}
}

