function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		cottage_creams_menu_PWJ_Home_over = newImage("images/cottage_creams_menu_PWJ_-09.gif");
		cottage_creams_menu_PWJ_About_Us_over = newImage("images/cottage_creams_menu_PWJ_-12.gif");
		cottage_creams_menu_PWJ_Contact_over = newImage("images/cottage_creams_menu_PWJ_-15.gif");
		preloadFlag = true;
	}
}

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);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function PayPalPass() {
document.ppform.last_name.value = document.ppform.b_last.value
document.ppform.first_name.value = document.ppform.b_first.value
document.ppform.address1.value = document.ppform.b_addr.value
document.ppform.address2.value = document.ppform.b_addr2.value
document.ppform.city.value = document.ppform.b_city.value
document.ppform.state.value = document.ppform.b_state.value
document.ppform.zip.value = document.ppform.b_zip.value
document.ppform.email.value = document.ppform.b_email.value
document.ppform.night_phone_b.value = document.ppform.b_phone.value
}
//End PayPal pass variables-->

function CheckForm( theform )
{
    var bMissingFields = false;
    var strFields = "";

    if( theform.b_first.value == '' ){
        bMissingFields = true;
        strFields += "     Billing: First Name\n";
    }
    if( theform.b_last.value == '' ){
        bMissingFields = true;
        strFields += "     Billing: Last Name\n";
    }
    if( theform.b_addr.value == '' ){
        bMissingFields = true;
        strFields += "     Billing: Address\n";
    }
    if( theform.b_city.value == '' ){
        bMissingFields = true;
        strFields += "     Billing: City\n";
    }
    if( theform.b_state.value == '' ){
        bMissingFields = true;
        strFields += "     Billing: State\n";
    }
    if( theform.b_zip.value == '' ){
        bMissingFields = true;
        strFields += "     Billing: Postcode\n";
    }
    if( theform.b_email.value == '' ){
        bMissingFields = true;
        strFields += "     Billing: E-Mail\n";
    }
    if( bMissingFields ) {
        alert( "I'm sorry, but you must provide the following field(s) before continuing:\n" + strFields );
        return false;
    }
    return true;}

