function showhelp(){
	var scr;
	var stout;
	scr=fromtop();
	if(document.all){
		var helpel=document.all["help"];
	}	
	else if(document.getElementById){
		var helpel=document.getElementById("help");
	}
	if(helpel.style.display=="block"){
		clearTimeout(stout);
		helpel.style.display="none";
		showselects();
		showflash();
	}
	else{
		helpel.style.display="block";
		helpel.style.top=(scr+10)+"px";
		stout=setTimeout("poshelp()",1);
		hideselects();
		hideflash();
	}
}
function poshelp(){
	var scr=fromtop();
	if(document.all) document.all["help"].style.top=(scr+10)+"px";
	else if(document.getElementById) document.getElementById("help").style.top=(scr+10)+"px";
	stout=setTimeout("poshelp()",1);
}
function fromtop(){
	var y;
	if (self.pageYOffset) // all except Explorer
	{
		y = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
		// Explorer 6 Strict
	{
		y = document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
		y = document.body.scrollTop;
	}
	return y;
}

function isblank(s){
	for(var i=0; i<s.length; i++){
		var c=s.charAt(i);
		if((c!=' ') && (c!='') && (c!='\n')) return false;
	}
	return true;
}
function valnewim(f){
	var desc=f.imgdesc.value;
	var thumb=f.upthumb.value;
	var main=f.upmain.value;
	var errs="";
	var msg="";
	if ((desc==null) || (desc=="") || isblank(desc)){
		errs+="\n Please input an image description";
	}
	if ((thumb==null) || (thumb=="") || isblank(thumb)){
		errs+="\n Please select a thumbnail image";
	}
	if ((main==null) || (main=="") || isblank(main)){
		errs+="\n Please select a main image";
	}
	if(!errs){
		return true;
	}else{
		msg ="_____________________________________________________\n\n";
		msg+="The form was not submitted because of the following error(s).\n";
		msg+="Please correct the error(s) and re-submit.\n";
		msg+="_____________________________________________________\n\n";
		msg+=errs;
		alert(msg);
		return false;
	}
}