var enlarged;
var prevWidth;
var prevHeight;
function enlarge(img,w,h){
	var content="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head>";
	content+="<title>Nagyítás</title><link href=\"/tmpl/tovaros/common/enlarged.css\" type=\"text/css\" rel=\"stylesheet\"></head>";
	content+="<body>";
	content+="<table cellspacing=\"0\" cellpadding=\"0\" class=\"holder\">";
	content+="<tr><td>";
	content+="<a href=\"javascript: this.window.close()\"><img src=\""+img+"\" alt=\"Close this window\"></a>";
	content+="</td></tr></table>";
	content+="</body></html>";
	var attribs="titlebar=0,toolbar=0,scrollbars=0,resizeable=0,directories=0,status=0,location=0,menubar=0,width="+w+",height="+h+"";
	
	if(!enlarged || enlarged.closed){	
		enlarged=window.open("","zoom",attribs);
		
	}else{
		var newWidth=w-prevWidth;
		var newHeight=h-prevHeight;
		enlarged.resizeBy(newWidth,newHeight);
		enlarged.focus();
		
	}
	prevWidth=w;
	prevHeight=h;
	enlarged.moveTo(0,0);
	enlarged.document.write(content);
	enlarged.document.close();
}
function openWindow(url,w,h){
	var attribs="titlebar=0,toolbar=0,scrollbars=0,resizeable=0,directories=0,status=0,location=0,menubar=0,width="+w+",height="+h+"";
	var win=window.open(url,"popup",attribs);
	win.moveTo(0,0);
}
function drawEmbed(embedType,embed,returnText) {
/* Usage:
var flash = new Array();
flash["src"] = "flash/home/p_home_base.swf";
flash["base"] = "flash/home/"
flash["FlashVars"] = "altContentURL=/MusaWeb/displayPage.action?pageParameter=blah";
flash["quality"] = "high";
flash["bgcolor"] = "#ffffff";
flash["width"] = "750";
flash["height"] = "417";
flash["name"] = "bod";
flash["align"] = "";
flash["scale"] = "noscale";
flash["menu"] = "0";
flash["wmode"] = "transparent";

drawEmbed("flash",homePageFlash);

*/
	var embedObj = new Array();
	embedObj["flash"] = new Array();
	embedObj["flash"]["type"] = "application/x-shockwave-flash";
	embedObj["flash"]["pluginspage"] = "http://www.macromedia.com/go/getflashplayer";

	embedObj["qt"] = new Array();
	embedObj["qt"]["type"] = "video/quicktime";
	embedObj["qt"]["pluginspage"] = "http://www.apple.com/quicktime/download/";

	var embedArray = embed;
	if (embedType.constructor == Array) embedArray.concat(embedType);
	else embedArray.concat(embedObj[embedType]);

	var embedHtml = "<embed ";
	for (var i in embedArray)
		embedHtml += " "+i+"=\""+embedArray[i]+"\"";
	embedHtml += "></embed>";

	if (!returnText) document.write(embedHtml);
	else return embedHtml;
}

