<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// form validation
   function validFile(file) {

      if (file == "") {
         return true
      }

      if (file.indexOf(".jpg") > 0) {
         return true
      }

      if (file.indexOf(".jpeg") > 0) {
         return true
      }

      if (file.indexOf(".JPG") > 0) {
         return true
      }

      if (file.indexOf(".JPEG") > 0) {
         return true
      }

   return false
}

function validate() {
	file = document.getElementById('F2').value;
    if (!validFile(file)) {
		alert("Invalid file type. You may only upload files with a .jpg file extension")
		return false
	}
	else{

		var err, x;
		err = "Please enter the following;\n\n";
		x = 0;
	
		if(document.getElementById("inpTitle").value== ""){
			err+= " - A Product Code.\n";
			x = x+1 ;
		}
		
		if(document.getElementById("inpIntro").value== ""){
			err+= " - A Product name.\n";
			x = x+1 ;
		}
		
		if(document.getElementById("inpText").value== ""){
			err+= " - A Product Description.\n";
			x = x+1 ;
		}
	
		if(x!=0){
			alert(err);
			return false;
		}
		else{
			return true;
		}
	
	}

return true
}



function confirmAlert(msg){
	if (confirm(msg)) {
		return true;
	}
	else {
		return false;
   }   
}

function openPopUp(url){
	w = (screen.width/2) - 200;
	h = (screen.height/2) - 150;

    objWin = window.open(url,'pic','width=580,height=580,screenX=' + w + ',screenY=' + h + ',resizable=no,scrollbars=1'); 
}

function openPopUpNew(url){
	w = (screen.width/2) - 200;
	h = (screen.height/2) - 150;

    objWin = window.open(url,'pic','width=610,height=580,screenX=' + w + ',screenY=' + h + ',resizable=no,scrollbars=1'); 
}

//-->
