
function login(){
	if(document.login.uid.value==""){
		alert("Please enter user id")
		document.login.uid.focus();
		return false;
	}
	if(document.login.pwd.value==""){
		alert("Please enter password")
		document.login.pwd.focus();
		return false;
	}
	return true;
}


function verifycatform(){
	if(document.catform.category.value==""){
		alert("Please Select Category")
		document.catform.category.focus();
		return false;
	}
	arg=document.catform.category.options[document.catform.category.selectedIndex].value;
	document.catform.action="showcat_drawings.asp?catid="+arg;
	document.catform.submit();
	return true;
}
function verifyartistform(){
	if(document.artform.artist.value==""){
		alert("Please Select Artist")
		document.artform.artist.focus();
		return false;
	}
	arg=document.artform.artist.options[document.artform.artist.selectedIndex].value;
	document.artform.action="view_artist_collection.asp?manid="+arg;
	document.artform.submit();
	return true;
}
function search(){
	if(document.search.artsearch.value==""){
		alert("Please enter artist name")
		document.artform.artsearch.focus();
		return false;
	}
	
	return true;
}

function resize(which, max) {

  var elem = document.getElementById(which);
  if (elem == undefined || elem == null) return false;
	  if(elem.width>=150){
		  if (max == undefined) max = 100;
		  if (elem.width > elem.height) {
			if (elem.width > max) elem.width = max;
		  } else {
			if (elem.height > max) elem.height = max;
	    }
  }
}

function resize1(which, max) {

  var elem = document.getElementById(which);
  if (elem == undefined || elem == null) return false;
	  if(elem.width>100){
		  if (max == undefined) max = 100;
		  if (elem.width > elem.height) {
			if (elem.width > max) elem.width = max;
		  } else {
			if (elem.height > max) elem.height = max;
	    }
  }
}

function resize2(which, max) {

  var elem = document.getElementById(which);
  if (elem == undefined || elem == null) return false;
	  if(elem.width>150){
		  if (max == undefined) max = 150;
		  if (elem.width > elem.height) {
			if (elem.width > max) elem.width = max;
		  } else {
			if (elem.height > max) elem.height = max;
	    }
  }
}