function popup (ziel,width,height){
    window.open(ziel,"popup","width="+width+",height="+height+",left=0,top=0,scrollbars=yes,resizable=yes");    
}

function lupe (ziel,width,height){
    win = window.open(ziel,"lupe","width="+width+",height="+height+",left=0,top=0, scrollbars=no, resizable=no");
    win.focus();
}


function gotoShop(ziel){
   window.close();
   win = window.open(ziel,"shop","width=600,height=400,left=0,top=0, location=yes, menubar=yes, toolbar=yes, scrollbars=yes, status=yes, resizable=yes");
   win.focus();
}


function measuretable(sessid,producttype_id){
	width = 625;
	height = 550;
    window.open("shop.php?PHPSESSID="+sessid+"&op=producttype&producttype_id="+producttype_id,"popup","width="+width+",height="+height+",left=0,top=0,scrollbars=yes,resizable=no");
}

function printtype(sessid,printtype_id){
	width = 625;
	height = 550;
    window.open("shop.php?PHPSESSID="+sessid+"&op=printtype&printtype_id="+printtype_id,"popup","width="+width+",height="+height+",left=0,top=0,scrollbars=yes,resizable=no");    
}

function font(sessid){
	width = 625;
	height = 550;
    window.open("shop.php?PHPSESSID="+sessid+"&op=info_fonts","popup","width="+width+",height="+height+",left=0,top=0,scrollbars=yes,resizable=no");    
}
function printcolor(sessid){
	width = 625;
	height = 550;
    window.open("shop.php?PHPSESSID="+sessid+"&op=info_fonts#printcolor","popup","width="+width+",height="+height+",left=0,top=0,scrollbars=yes,resizable=no");    
}

function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}
window.onload = externalLinks; 