
function jumpMenu(targ,selObj,restore){ 
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0; }

function toggleComment(a) {
if (document.getElementById) {
	document.getElementById("cmt"+a).style.display=(document.getElementById("cmt"+a).style.display=="block")?"none":"block"
	return false;
}
else return true;
}

function showHTTP(a) { if (a.value=='') a.value='http://'; }
function hideHTTP(a) { if (a.value=='http://') a.value=''; }

function validateComment(a) {
if (a.comment.value=="") {
	alert("Please enter a comment.");
	return false;
}
else if (a.website.value!="" && a.website.value.substring(0,7)!="http://") {
	alert("Please make sure your Web site begins with \"http://\". Or, if you don't have a Web site, clear that field.");
	return false;
}
else return true;
}

function validateSearch(a) {
if (a.q.value=="") {
	alert("Please enter something to search for.");
	return false;
}
}

function linksInNewWindow(a) {
var b=a?"_blank":"_self";
var c=document.links;
for(var i=0;i<c.length;i++) {if(c[i].href.search("smartnuts.com")==-1) c[i].target=b};
var date=new Date();
date.setTime(date.getTime()+(14*24*60*60*1000));
document.cookie=a?"newwin=true; expires="+date.toGMTString()+";":"newwin=false;";
}
