function printPopup(mID, sID, w)  {
  url = 'index_print.asp?mainID=' + mID + '&subID=' + sID;
  var printWindow = window.open(url, '', 'resizable=1,menubar=yes,scrollbars=1,location=no,toolbar=1,directories=no,width=' + w);
}

var ie, ns, ns6;

ns6 = (document.getElementById);
ns = (document.layers);
ie = (document.all);

function showObj(obj) {
  if(ie)document.all[obj].style.visibility='visible'
  if(ns)document.layers[obj].visibility='visible'
  if(ns6)document.getElementById(obj).style.visibility = "visible";
}

function hideObj(obj) {
  if(ie)document.all[obj].style.visibility='hidden'
  if(ns)document.layers[obj].visibility='hidden'
  if(ns6)document.getElementById(obj).style.visibility = "hidden";
}

function createPopup(filename, w, h, scroll)  {
	window.open(filename, '', 'resizable=0,menubar=no,scrollbars=' + scroll + ',location=no,toolbar=0,status=0,directories=no,width=' + w + ',height=' + h);	
}

function display(myimage) {
 html = "<HTML><HEAD><TITLE>Planlösning</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+35,document.image.height+35)'>"
  + "</CENTER>" 
  + "</BODY></HTML>";
 popup=
 window.open
  ('','image',
  'toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
 popup.document.open();
 popup.document.write(html);
 popup.document.focus();
 popup.document.close()
 };

