<!--



function get_url(val)
{
	var is_protocol_ok=val.indexOf('http://');
	if (is_protocol_ok==-1)
	 { 
		return false;
	 }
	 else{
		return true;
	}
}





function pickpixel(pixel){
	document.pixelform.pixelnum.value=pixel;
	
	if(valid(pixelform)){
		document.pixelform.submit();
	}
	
}

function isValidEmail(str) {

   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
 
}

function fnRemoveStyle(object){

 object.className = "textbox1";

}

function valid(form) {

  if (!isValidEmail(form.email.value)) {

    alert("You must enter a correct email address.");

    form.email.focus();

    form.email.className = "textbox_error";

    return false;

  }
   else if (!form.title.value) {

    alert("You must enter a Title for your ad.");

    form.title.focus();

    form.title.className = "textbox_error";

    return false;

  }
   else if (!get_url(form.url.value)) {

    alert("URL must begin with http://");

    form.url.focus();

    form.url.className = "textbox_error";

    return false;

  }
    else if (!(form.image_file.value)) {

    alert("Must choose an image file to upload");

    form.image_file.focus();

    form.image_file.className = "textbox_error";

    return false;

  }
  else{
  	return true;
  }

}   
-->
