function initCustom() {
  
}

function check_promo_code(id, link)
{
		var val = eval("document.DLGuardCouponForm_"+id+".dlgCoupon.value");
		if (val == "" || val == "Enter Promo Code")
			{
				if (typeof gwoTracker != 'undefined'){
                                        gwoTracker._setAllowLinker(true);
					gwoTracker._link(link);}
				else
					window.location.href = link;
			}
		else
			{
				if (typeof gwoTracker != 'undefined')
				{
			 		gwoTracker._linkByPost(eval("document.DLGuardCouponForm_"+id)) 	
				}
			 eval("document.DLGuardCouponForm_"+id+".submit();");
			}
		
}

function validate_email_form(form){
	var name = $j.trim(form.name.value); 
	var email = $j.trim(form.email.value); 
	var emailRegEx = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+[a-zA-Z0-9]{2,4}$/;
	
	if( name == "" || name == "Enter First Name") {
			alert('Please provide your First Name.');
			form.email_name.focus();
			return false;
	}
	
	if(name.length <= 1){
		alert('First Name should be atleast 2 characters of length.');
		form.email_name.focus();
		return false;		
	}
	
	if( email == "" || email == "Enter Email Address") {
			alert('Please provide your Email Address.');
			form.email_address.focus();
			return false;
	}
	if( email != "" && email != "Enter Email Address" && !email.match(emailRegEx)) {
			alert('Please provide a valid Email Address.');
			form.email_address.focus();
			return false;
	}
	return true;
}


jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}

