function resizeImg(obj,width,height){
	if (obj.width <= width)
		return;
	
	var perPar = width / height;
	var perObj = obj.width / obj.height;
	/*
	if (obj.height * perPar > 130){
		obj.height = 110;
		obj.width = obj.height * perObj;
	}else{
		obj.width = 130;
		obj.height = obj.width / perObj;
	}
	*/
	
	if(perObj > perPar){
		obj.width = width;
		obj.height = width / perObj;
	}else{
		obj.height = height;
		obj.width = height * perObj;
	}
}

function gotoStep2(typeID){
	window.location = "manage_album_upload_2.asp?typeID=" + typeID;
}

function gotoStep2_pro(typeID){
	window.location = "manage_pro_upload_2.asp?typeID=" + typeID;
}

function gotoTypePage(typeID){
	window.location = "manage_album_typeDisplay.asp?typeID=" + typeID;	
}

function gotoTypePage_pro(typeID){
	window.location = "manage_pro_typeDisplay.asp?typeID=" + typeID;	
}

function gotoBatAdd(typeID){
	window.location = "manage_album_batAdd_2.asp?typeID=" + typeID;	
}

function gotoBatAdd_pro(typeID){
	window.location = "manage_pro_batAdd_2.asp?typeID=" + typeID;	
}

function gotoBatDel(typeID){
	window.location = "manage_album_batDel_2.asp?typeID=" + typeID;	
}

function gotoBatDel_pro(typeID){
	window.location = "manage_pro_batDel_2.asp?typeID=" + typeID;	
}

function gotoTypePage_(typeID){
	window.location = "album_view.asp?typeID=" + typeID;	
}

function changeNum(typeID,obj){
	window.location = "manage_album_batAdd_2.asp?typeID="+typeID+"&num="+obj.value;
}

function changeNum_pro(typeID,obj){
	window.location = "manage_pro_batAdd_2.asp?typeID="+typeID+"&num="+obj.value;
}

function showImg(url){
	
}

function showMod(obj){
	var mod = obj.childNodes[0];
	var des = obj.childNodes[1];
	if ( mod.style.display == "block" ) return;
	des.style.display = "none";
	mod.style.display = "block";
}

function showDes(obj){
	/*var par = obj.parentElement.parentElement.parentElement;
	var modDes = par.childNodes[0];
	var des = par.childNodes[1];
	des.style.display = "block";
	*/
	
	window.location.reload();
	
	
}

function showChangeType(obj){
	var div = obj.childNodes[1];
	div.style.display = "block";	
}

function cancelChangeType(id){
	//id.style.display = "none";
	window.location.reload();
}

function submitSort(selectObj){
	var submitForm = selectObj.parentElement;
	submitForm.submit();
}

function submitBat(id){
	var frm = document.getElementByID("batDel");
	//frm.submit();
}

function setFileFileds(num){	
	for(var i=0,str="";i<num;i++){
		j = i+1;
		str+="ÉÏ´«Í¼Æ¬"+j+"£º<input name=\"strFile"+j+"\" type=\"file\" id=\"strFile"+j+"\" class=\"inputText\" ><br />";
	}
	objFiles.innerHTML=str;
}

function show(obj){
	obj.style.display = "block";
	obj.style.zIndex = "1000";
	obj.style.position = "relative";
}

function hide(obj){
	window.location = "manage_ad.asp";
}


function viewPrintPage(url,title,feature){
	var newwnd = window.open(url,title,feature);
}

