/*************************
  Carlos Charles
  ************************
  Copyright (c) 2005-2007 Carlos Charles
  v1.1 originally written by CARLOS CHARLES
  ********************************************
  http://www.carloscharles.com/
**********************************************/

// Main Display
function erich_swf() {
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="350">');
document.write('<param name="movie" value="cars-header.swf">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent" />');
document.write('<embed src="cars-header.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="350"></embed></object>');
}

// Open Image
function popupWindow(url) {
 var width  = 850;
 var height = 700;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false;
}

//Form Validator
function valFrm_Registro(theForm) {
	/** Validationg form data **/
				
		if ( theForm.name.value.length < 3 ) {
			alert("Ooops! Forgot your name?");
			theForm.name.focus();
			return false
		}
		
		if ( !(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.email.value)) ) {
			alert("Ooops! Forgot your email?");
			theForm.email.focus();
			return false;
		}
		
		if ( theForm.phone.value.length < 3 ) {
			alert("Ooops! Forgot your phone number.");
			theForm.phone.focus();
			return false
		}
		
		if ( theForm.title.value.length < 1 ) {
			alert("Ooops! Forgot title?");
			theForm.title.focus();
			return false
		}
		
		if ( theForm.message.value.length < 1 ) {
			alert("Ooops! Forgot your message?");
			theForm.message.focus();
			return false
		}
		
		
	/** End of validating process **/
	
	return true;
}
