//this highlights the topnav link, which is set in the body tag
var currentpage = "none";
	
	function setPage(pagename){
		if (document.images[currentpage]){
			document.images[currentpage].src = eval(currentpage).src;
		}
			if (pagename != 'none' && document.images[pagename]){
				document.images[pagename].src = eval(pagename+"on").src;
			}
			currentpage = pagename;
		}
		
//this preloads all the images
if (document.images) {
		button_login_off= new Image;
     	button_login_off.src="/images/button_login_off.gif";
		button_login_on= new Image;
     	button_login_on.src="/images/button_login_on.gif";
		
		button_signmeup_off= new Image;
     	button_signmeup_off.src="/images/button_signmeup_off.gif";
		button_signmeup_on= new Image;
     	button_signmeup_on.src="/images/button_signmeup_on.gif";
		
		button_go_off= new Image;
     	button_go_off.src="/images/button_go_off.gif";
		button_go_on= new Image;
     	button_go_on.src="/images/button_go_on.gif";
		
		advsearch_off= new Image;
     	advsearch_off.src="/images/advsearch_off.gif";
		advsearch_on= new Image;
     	advsearch_on.src="/images/advsearch_on.gif";
		
		button_post_off= new Image;
     	button_post_off.src="/images/button_post_off.gif";
		button_post_on= new Image;
     	button_post_on.src="/images/button_post_on.gif";
		
		logout_off= new Image;
     	logout_off.src="/images/logout_off.gif";
		logout_on= new Image;
     	logout_on.src="/images/logout_on.gif";
		
		button_addmore_off= new Image;
     	button_addmore_off.src="/images/button_addmore_off.gif";
		button_addmore_on= new Image;
     	button_addmore_on.src="/images/button_addmore_on.gif";
		
		button_browse_off= new Image;
     	button_browse_off.src="/images/button_browse_off.gif";
		button_browse_on= new Image;
     	button_browse_on.src="/images/button_browse_on.gif";
		
		button_submit_off= new Image;
     	button_submit_off.src="/images/button_submit_off.gif";
		button_submit_on= new Image;
     	button_submit_on.src="/images/button_submit_on.gif";
		
		button_submitrecipe_off= new Image;
     	button_submitrecipe_off.src="/images/button_submitrecipe_off.gif";
		button_submitrecipe_on= new Image;
     	button_submitrecipe_on.src="/images/button_submitrecipe_on.gif";
		
		button_search_off= new Image;
     	button_search_off.src="/images/button_search_off.gif";
		button_search_on= new Image;
     	button_search_on.src="/images/button_search_on.gif";
		
		button_update_off= new Image;
     	button_update_off.src="/images/button_update_off.gif";
		button_update_on= new Image;
     	button_update_on.src="/images/button_update_on.gif";
		
		button_delete_off= new Image;
     	button_delete_off.src="/images/button_delete_off.gif";
		button_delete_on= new Image;
     	button_delete_on.src="/images/button_delete_on.gif";
		
		button_cancel_off= new Image;
     	button_cancel_off.src="/images/button_cancel_off.gif";
		button_cancel_on= new Image;
     	button_cancel_on.src="/images/button_cancel_on.gif";
		
		button_invite_off= new Image;
     	button_invite_off.src="/images/button_invite_off.gif";
		button_invite_on= new Image;
     	button_invite_on.src="/images/button_invite_on.gif";
		
		button_send_off= new Image;
     	button_send_off.src="/images/button_send_off.gif";
		button_send_on= new Image;
     	button_send_on.src="/images/button_send_on.gif";
		
		button_savechanges_off= new Image;
     	button_savechanges_off.src="/images/button_savechanges_off.gif";
		button_savechanges_on= new Image;
     	button_savechanges_on.src="/images/button_savechanges_on.gif";
		
		button_savedraft_off= new Image;
     	button_savedraft_off.src="/images/button_savedraft_off.gif";
		button_savedraft_on= new Image;
     	button_savedraft_on.src="/images/button_savedraft_on.gif";
		
		takelook_off= new Image;
     	takelook_off.src="/images/takealook_off.gif";
		takelook_on= new Image;
     	takelook_on.src="/images/takealook_on.gif";
		
		comingsoon_about_on= new Image;
     	comingsoon_about_on.src="/images/comingsoon_about_on.gif";
		comingsoon_about_off= new Image;
     	comingsoon_about_off.src="/images/comingsoon_about_off.gif";
		
		comingsoon_contact_on= new Image;
     	comingsoon_contact_on.src="/images/comingsoon_contact_on.gif";
		comingsoon_contact_off= new Image;
     	comingsoon_contact_off.src="/images/comingsoon_contact_off.gif";
		
		comingsoon_blog_on= new Image;
     	comingsoon_blog_on.src="/images/comingsoon_blog_on.gif";
		comingsoon_blog_off= new Image;
     	comingsoon_blog_off.src="/images/comingsoon_blog_off.gif";
  }
 
 //rollover function for single images
 function rollImage(imagename,imageloc){
		if (currentpage != imageloc){
			document.images[imageloc].src = imagename.src;
		}
	}

function openAWindowHelp( pageToLoad, winName, width, height, center) {  
	xposition=250; yposition=50;

    if ((parseInt(navigator.appVersion) >= 4 ) && (winName=="undefined")){
    xposition=screen.width-400; yposition=screen.height-480;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
	}
	
function openAWindowSitereqs( pageToLoad, winName, width, height, center) {  
	xposition=250; yposition=300;

    if ((parseInt(navigator.appVersion) >= 4 ) && (winName=="undefined")){
    xposition=screen.width-400; yposition=screen.height-480;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
	}
	
function openAWindowRecipeFull( pageToLoad, winName, width, height, center) {  
	xposition=250; yposition=50;

    if ((parseInt(navigator.appVersion) >= 4 ) && (winName=="undefined")){
    xposition=screen.width-400; yposition=screen.height-480;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
	}
	
function openAWindowRecipe3x5( pageToLoad, winName, width, height, center) {  
	xposition=250; yposition=50;

    if ((parseInt(navigator.appVersion) >= 4 ) && (winName=="undefined")){
    xposition=screen.width-400; yposition=screen.height-480;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
	}
	
function openAWindowRecipe4x6( pageToLoad, winName, width, height, center) {  
	xposition=250; yposition=50;

    if ((parseInt(navigator.appVersion) >= 4 ) && (winName=="undefined")){
    xposition=screen.width-400; yposition=screen.height-480;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
	}
	
function openAWindowEmails( pageToLoad, winName, width, height, center) {  
	xposition=350; yposition=250;

    if ((parseInt(navigator.appVersion) >= 4 ) && (winName=="undefined")){
    xposition=screen.width-400; yposition=screen.height-480;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
	}
	

function checkclear(what){
if(!what._haschanged){
  what.value=''
};
what._haschanged=true;
}


