function change_div_bg(x) {

	var mydivs = new Array();
	mydivs[0] = "recipes_div";
	mydivs[1] = "cooking_tips_div";
	mydivs[2] = "chefs_div";

	for (i=0;i<mydivs.length;i++) {

		if (x == mydivs[i]) {

			document.getElementById(mydivs[i]).style.background = "#645543";
			document.getElementById(mydivs[i]).style.cursor = "default";

		} else {

			document.getElementById(mydivs[i]).style.background = "#D5CBC0";
			document.getElementById(mydivs[i]).style.cursor = "pointer";

		}

	}

}

// -- opens maillist confirmation in pop up

function openTarget(form, features, windowName) {

	if (!windowName) windowName = 'formTarget' + (new Date().getTime());
        form.target = windowName;
        window.open('', windowName, features);
        
}

function CreateBookmarkLink() {

	title = document.title;
	url = location.href;

	if (window.sidebar) { // Mozilla Firefox Bookmark
		
		window.sidebar.addPanel(title, url,"");
	
	} else if( window.external ) { // IE Favorite
		
		window.external.AddFavorite( url, title); }
	
	else if(window.opera && window.print) { // Opera Hotlist
		
		return true;
		
	}
 }
 
 // --- recommend this page script
 function recommendPage() {
 
 	thisPage = document.location.href;
 	scriptSrc = "/phprecommend_x.php?phprec_new_page=1&referer=";
 	goHere = scriptSrc + thisPage;
 	openAnyWindow(goHere,'remote', 375, 675,'status','top=25','left=25');
 
}

function openAnyWindow(url, name) {

	var l = openAnyWindow.arguments.length;
	var w = "";
	var h = "";
	var features = "";

	for (i=2; i<l; i++) {
	var param = openAnyWindow.arguments[i];
	if ( (parseInt(param) == 0) ||
	(isNaN(parseInt(param))) ) {
	features += param + ',';
	} else {
	(w == "") ? w = "width=" + param + "," :
	h = "height=" + param;
	}
	}

	features += w + h;
	var code = "popupWin = window.open(url, name";
	if (l > 2) code += ", '" + features;
	code += "')";
	eval(code);

}

if (window!= top) top.location.href = location.href;
