/*
footer functions
~ onclick="function();return false"
function privacy() {
    newwindow = window.open('privacy.php','terms','"toolbar=no,address=no,left=100,top=100,status=no,width=620,height=450,scrollbars=yes,resizable=yes"')
}
function terms() {
	newwindow = NewWindow('terms/LNA_Site_Terms-11-39-21.pdf','terms',300,300,'yes');
}
*/
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
	//setTimeout(window.open(mypage,myname,settings),80);
}

function copyright(brand){
  var year = new Date().getFullYear ();
  document.write('&copy; ' + brand + ' ' + year);
}


/*
Flash  function to open  a poup window
*/

function getLink(url, parameters){
	eval("newWindow = window.open(url" + parameters + ")");
}
	

function terms() {
	setTimeout("NewWindow(window.location.protocol + '//' + window.location.host + '/terms.php','terms',500,600,'yes')", 50);
	//newwindow = NewWindow('terms.html','terms',500,600,'yes');

}

function privacy() {
	setTimeout("NewWindow(window.location.protocol + '//' + window.location.host + '/privacy.php','privacy',500,600,'yes')",50);
	//newwindow = NewWindow('privacy.html','privacy',500,600,'yes');

}

function contact() {
	setTimeout("NewWindow(window.location.protocol + '//' + window.location.host + '/contact.php', 'contact', 590, 600, 'yes')",50);
	//newwindow = NewWindow('contact.php', 'contact', 500, 600, 'yes');

}

function unsubscribe(){
	setTimeout("NewWindow(window.location.protocol + '//' + window.location.host + '/unsubscribe.php', 'unsubscribe', 500, 600, 'yes')",50);
	//newwindow = NewWindow('unsubscribe.php', 'unsubscribe', 500, 600, 'yes');

}

function sendToFriend(recipeID){
        var url = window.location.protocol + "//" + window.location.host + "/sendToFriend.php?recipe=" + recipeID;
	var cmd = "NewWindow('"+ url +"', 'sendToFriend', 500, 600, 'yes')";
        setTimeout(cmd ,50);
}


function joinClub(){
	setTimeout("NewWindow(window.location.protocol + '//' + window.location.host + '/joinClub.php', 'joinClub', 550, 700, 'yes')", 50);
	//newwindow = NewWindow('joinClub.php', 'joinClub', 550, 700, 'yes');	
}


function closeWindow(){
	window.close();	
}

// comment function for the forms of the site

function cleanInput(){
	$("input").val("");
	$("textarea").val("");
}






