<!--

// functions to handle adverts and the buttons on them

function open_advert_window(type, page_url)
{
	var decorations;
	var title = type;
	var new_window = true;
	switch (type)
	{
		case "vouchers":
			decorations = "menubar=yes, resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=yes,left=0,top=0, width=600, height=600";
			new_window = true;
			break;

		case "details":
		case "email":
			decorations = "menubar=no, resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,left=0,top=0, width=600, height=600";
			new_window = true;
			break;
			
		case "web":
			decorations = "menubar=yes, resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,left=0,top=0, width=700, height=600";
			new_window = true;
			break;

		case "emailsame":
			new_window = false;
			break;
			
		case "websame":
			new_window = false;
			break;
	}
		
	if (new_window)
	{
		window.open(page_url, title, decorations);
	}
	else
	{
		document.location = page_url;
	}

}

function check_prices()
{
	var decorations = "menubar=no, resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,left=0,top=0, width=600, height=500";
	window.open("check_prices.php", "prices", decorations);
}

function add_to_profile(ad_ref, root_path)
{
	var decorations = "menubar=yes, resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,left=0,top=0, width=775, height=600";
	window.open(root_path + "add_to_profile.php?ad_ref=" + ad_ref, "add_to_profile", decorations);
}

//-->