function disenable(id){
	if (document.getElementById(id).disabled == "") {
		document.getElementById(id).disabled = true
	} else {
		document.getElementById(id).disabled = false
	}
	//document.getElementById(id).style.display = show;
}
function screenies(id,img) {
  window.open('/screenshots/' + id + '/' + img,'','scrollbars=yes, width=1024, height=768')
}
function downloads(id,dl) {
  window.open('/downloads/' + id + '/' + dl,'','scrollbars=yes, width=1024, height=768')
}
function showhide(id){
	if (document.getElementById(id).style.display == "") {
		show = "none";
	} else {
		show = "";
	}
	document.getElementById(id).style.display = show;
}
function hide(id){
	if (document.getElementById(id).style.display == "") {
		show = "none";
	}
}
function showit(id){
	if (document.getElementById(id).style.display == "none") {
		show = "";
	}
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function comparefields(f1,f2,rule,errorMsg){
	var myErr = "";
	if ((MM_findObj(f2).value != "") || (MM_findObj(f2).value != "")) { // If one of the options isn't empty...
	  if(eval("MM_findObj('"+f1+"').value"+rule+"MM_findObj('"+f2+"').value")){
		alert(unescape(errorMsg));myErr += 'errorMsg';}
	  document.MM_returnValue = (myErr == "")
	}
}
function comparefieldsstrict(f1,f2,rule,errorMsg){
	var myErr = "";
	  if(eval("MM_findObj('"+f1+"').value"+rule+"MM_findObj('"+f2+"').value")){
		alert(unescape(errorMsg));myErr += 'errorMsg';}
	  document.MM_returnValue = (myErr == "");
}
function regexpvalidator(f,re,eMsg,ru,r){
	var myErr="";var fv=MM_findObj(f).value;var rex=new RegExp(unescape(re));
	var t=eval(ru+rex.test(fv));if(r){if(fv.length<=0||!t){alert(unescape(eMsg));myErr+="eMsg";}}
	else if(fv.length>0&&!t){alert(unescape(eMsg));myErr+="eMsg";}document.MM_returnValue=(myErr=="");
}