
function display(myimage) {
	html = "<HTML><HEAD><TITLE>www.jeep.pt</TITLE>" +
	"</HEAD><BODY LEFTMARGIN=0 " +
	"MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER>" +
	"<IMG SRC='" + myimage + "' BORDER=0 NAME=image " +
	"onload='window.resizeTo(document.image.width,document.image.height)'></CENTER>" +
	"</BODY></HTML>";
	popup=window.open
	('','image','left=20,top=20,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1,left="0"');
	popup.document.open();
	popup.document.write(html);
	popup.document.focus();
	popup.document.close();
 };
 
 
 
 function displayNoScroll(myimage) {
	html = "<HTML><HEAD><TITLE>www.jeep.pt</TITLE>" +
	"</HEAD><BODY LEFTMARGIN=0 " +
	"MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER>" +
	"<IMG SRC='" + myimage + "' BORDER=0 NAME=image " +
	"onload='window.resizeTo(document.image.width,document.image.height)'></CENTER>" +
	"</BODY></HTML>";
	popup=window.open
	('','image','left=20,top=20,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
	popup.document.open();
	popup.document.write(html);
	popup.document.focus();
	popup.document.close();
 }

 
  function displayNoScroll(myimage) {
	html = "<HTML><HEAD><TITLE>www.jeep.pt</TITLE>" +
	"</HEAD><BODY LEFTMARGIN=0 " +
	"MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER>" +
	"<IMG SRC='" + myimage + "' BORDER=0 NAME=image " +
	"onload='window.resizeTo(document.image.width,document.image.height)'></CENTER>" +
	"</BODY></HTML>";
	popup=window.open
	('','image','left=20,top=20,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
	popup.document.open();
	popup.document.write(html);
	popup.document.focus();
	popup.document.close();
 }
 
function openPopupWindow(page)
{
var iTop;
var iLeft;
var sHeight;
var sWidth;
var sAttributes;

	sHeight = 550;
	sWidth = 463 + 18;
	// Calculate center of the screen.
	iTop = (window.screen.availHeight / 2) - Number(Number(sHeight) / 2.0);
	iLeft = (window.screen.availWidth / 2) - Number(Number(sWidth) / 2.0);
	// Concatenate attributes with width, height and window position.
	sAttributes = "height=" + sHeight + ",width=" + sWidth + ",top=" + String(iTop) + ",left=" + String(iLeft) + ",toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0";
 	window.open(page, "Catalogo", sAttributes);
}


function OpenViewer(sURL, sWidth, sHeight, sAttributes)
{
var iTop;
var iLeft;

	// Calculate center of the screen.
	iTop = (window.screen.availHeight / 2) - Number(Number(sHeight) / 2.0);
	iLeft = (window.screen.availWidth / 2) - Number(Number(sWidth) / 2.0);
	// Concatenate attributes with width, height and window position.
	sAttributes = "height=" + sHeight + ",width=" + sWidth + ",top=" + String(iTop) + ",left=" + String(iLeft) + "," + sAttributes;
	// Open new window.
	window.open(sURL, "_blank", sAttributes);
}
/*
<a href="javascript:display('../images/jsht.gif')">Javascript HowTo 1</a>
<a href="javascript:display('../images/jsht2.gif')">Javascript HowTo 2</a>
*/

function GetQueryValue(variable){
	var query = window.location.search.substring(1);
	var vars = query.split("&")
	for (var i=0; i < vars.length; i++) {
		var pair = vars[i].split("=");
		if (pair[0] == variable) {
			return pair[1];
		}	
	}
}
