function blank_check(name,almess) {
var blank,blank_ch;
blank_ch = "document.myform."+name+".value";
blank = eval(blank_ch);

if (!blank) { alert(almess); return false;}
else {return true;}
}

function form_submit(faction) {

cat_index = document.myform.parent.selectedIndex;

if(!blank_check("title","<%L_ERROR_2%>")) document.myform.title.focus();
else if(!blank_check("url","<%L_ERROR_3%>")) document.myform.url.focus();
else if(!blank_check("scont","<%L_ERROR_4%>")) document.myform.scont.focus();
else if(!blank_check("name","<%L_ERROR_5%>")) document.myform.name.focus();
else if(!blank_check("email","<%L_ERROR_6%>")) document.myform.email.focus();
else if(!blank_check("passwd","<%L_ERROR_7%>")) document.myform.passwd.focus();
else if (document.myform.parent.options[cat_index].value ==0) alert(' <%L_ERROR_1%> ');
else {
document.myform.action = faction;
document.myform.submit();
}

}


function change_cool(sel) { 

	var index = sel.selectedIndex; 
	if (index != '0' && index !='') 
	window.location.href = 'cool.php?type=' +sel.options[index].value; 
} 


function mail_submit(faction) {
	blank= document.mailform.mailaddr.value;
	if(blank == '') {
	alert("<%L_NOADDR%>");
	document.mailform.mailaddr.focus();
	}
	else {
	document.mailform.action = faction;
	document.mailform.submit();
	}
}


