function OpenWindow(Url,Width,Height,WindowObj)
{
	var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:no;help:no;scroll:no;');
	return ReturnStr;
}

function SelectSever()
{
	ReturnValue = OpenWindow('../Dialog/SelectSeverFrame.asp',400,300,window);
	if (ReturnValue.indexOf('***')!=-1)
	{
		TempArray = ReturnValue.split('***');
		document.all.SeverID.value=TempArray[0]
		document.all.SeverName.value=TempArray[1]
	}
}
function SelectClass()
{
	ReturnValue = OpenWindow('../Dialog/SelectClassFrame.asp',400,300,window);
	if (ReturnValue.indexOf('***')!=-1)
	{
		TempArray = ReturnValue.split('***');
		document.all.ClassID.value=TempArray[0]
		document.all.ClassName.value=TempArray[1]
	}
}
function SubmitMovie()
{
if (form.SeverName.value=="") { //名字为空就返回了 
alert("服务器不能为空请选择服务器") 
form.SeverName.focus();
return false; }
if (form.ClassName.value=="") { //名字为空就返回了 
alert("栏目不能为空请选择栏目") 
form.ClassName.focus();
return false; }
if (form.MovieRegion.value=="") { //名字为空就返回了 
alert("请选择影片出产地区") 
form.MovieRegion.focus();
return false; }
document.form.submit();
}

function showcheckbox(cname,dname)
{
if(document.getElementById(cname).checked==true)
{
showThumbnail_RateOrSize(1,dname)
}
else
{
showThumbnail_RateOrSize(0,dname)
}
}
function showThumbnail_RateOrSize(param,pname)
{
	if(param==1)
	{
		document.getElementById(pname).style.display="block"
	}else
	{
		document.getElementById(pname).style.display="none"
	}
}

function CheckAll(v)
	{
		var i;
		for (i=0;i<document.forms.elements.length;i++)
		{
			var e = document.forms.elements[i];
		        e.checked = v;
		}
}