function setLightbox(inHdr,inObj,inWidth,inHeight){
  var lb='';
  var newdiv;
  removeBox();
  ShowFlash(false);
  findPosForBL(document.getElementById('realbody'));
  lb+='<TABLE CELLSPACING="0" CELLPADDING="0">';
  lb+='<TR><TD><IMG SRC="/files/gfx/lightbox_nw.png"></TD><TD BACKGROUND="/files/gfx/lightbox_n.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD><IMG SRC="/files/gfx/lightbox_ne.png"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BGCOLOR="#ffffff" STYLE="padding-bottom:5px;"><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"><TR><TD CLASS="lightbow_header" VALIGN="bottom">&nbsp;'+inHdr+'</TD><TD ALIGN="right" VALIGN="top"><IMG SRC="/files/gfx/btn_close.png" WIDTH="30" HEIGHT="30" BORDER="0" USEMAP="#lightboxclose"><MAP NAME="lightboxclose"><AREA SHAPE="circle" ALT="Lukk" COORDS="15,13,11" HREF="./" ONCLICK="removeBox();return false;"></MAP></TD></TR></TABLE></TD><TD BACKGROUND="/files/gfx/lightbox_e.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w_.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="2"></TD><TD BGCOLOR="#333333"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BACKGROUND="/files/gfx/lightbox_e_.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BGCOLOR="#ffffff" STYLE="padding-left:7px;padding-bottom:7px;"><IFRAME SRC="'+inObj+'"  WIDTH="'+inWidth+'" HEIGHT="'+inHeight+'" MARGINHEIGHT="0" MARGINWIDTH="0" FRAMEBORDER="0" SCROLLING="auto"></IFRAME></TD><TD BACKGROUND="/files/gfx/lightbox_e.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD><IMG SRC="/files/gfx/lightbox_sw.png"></TD><TD BACKGROUND="/files/gfx/lightbox_s.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD><IMG SRC="/files/gfx/lightbox_se.png"></TD></TR>';
  lb+='</TABLE>';
  newdiv=document.createElement('div');
  newdiv.setAttribute('id','lightboxShaddow');
  newdiv.setAttribute('class','lightbow_shaddow');
  newdiv.setAttribute('className','lightbow_shaddow');
  newdiv.innerHTML='';
  document.getElementById('lightbox').appendChild(newdiv);
  newdiv=document.createElement('div');
  newdiv.setAttribute('id','lightboxTopFrame');
  newdiv.setAttribute('class','lightbow_frame');
  newdiv.setAttribute('className','lightbow_frame');
  newdiv.innerHTML='<DIV CLASS="lightbow_iframe" STYLE="padding-top:'+fpBLt+'px;">'+lb+'</DIV>';
  document.getElementById('lightbox').appendChild(newdiv);
}
function modeller_provekjor(inID){
  var lb='';
  var inHdr='Pr&oslash;vekj&oslash;r';
  var inObj='modeller_provekjor.asp?id='+inID;
  var inWidth=670;
  var inHeight=320;
  var newdiv;
  ShowFlash(false);
  removeBox('lightboxModeller');
  findPosForBL(document.getElementById('realbody'));
  lb+='<TABLE CELLSPACING="0" CELLPADDING="0">';
  lb+='<TR><TD><IMG SRC="/files/gfx/lightbox_nw.png"></TD><TD BACKGROUND="/files/gfx/lightbox_n.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD><IMG SRC="/files/gfx/lightbox_ne.png"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BGCOLOR="#ffffff" STYLE="padding-bottom:5px;"><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"><TR><TD CLASS="lightbow_header" VALIGN="bottom">'+inHdr+'</TD><TD ALIGN="right" VALIGN="top"><IMG SRC="/files/gfx/btn_close.png" WIDTH="30" HEIGHT="30" BORDER="0" USEMAP="#lightboxclose"><MAP NAME="lightboxclose"><AREA SHAPE="circle" ALT="Lukk" COORDS="15,13,11" HREF="./" ONCLICK="removeBox(\'lightboxModeller\');return false;"></MAP></TD></TR></TABLE></TD><TD BACKGROUND="/files/gfx/lightbox_e.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w_.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="2"></TD><TD BGCOLOR="#333333"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BACKGROUND="/files/gfx/lightbox_e_.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BGCOLOR="#ffffff" STYLE="padding-left:7px;padding-bottom:7px;"><IFRAME SRC="'+inObj+'"  WIDTH="'+inWidth+'" HEIGHT="'+inHeight+'" MARGINHEIGHT="0" MARGINWIDTH="0" FRAMEBORDER="0" SCROLLING="auto"></IFRAME></TD><TD BACKGROUND="/files/gfx/lightbox_e.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD><IMG SRC="/files/gfx/lightbox_sw.png"></TD><TD BACKGROUND="/files/gfx/lightbox_s.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD><IMG SRC="/files/gfx/lightbox_se.png"></TD></TR>';
  lb+='</TABLE>';
  newdiv=document.createElement('div');
  newdiv.setAttribute('id','lightboxModeller');
  newdiv.setAttribute('class','lightbow_frame');
  newdiv.setAttribute('className','lightbow_frame');
  newdiv.innerHTML='<DIV CLASS="lightbow_modeller" STYLE="padding-top:'+fpBLt+'px;">'+lb+'</DIV>';
  document.getElementById('lightbox').appendChild(newdiv);
}
function modeller_brosjyrer(inID){
  var lb='';
  var inHdr='Brosjyrer og prisliste';
  var inObj='modeller_brosjyrer.asp?id='+inID;
  var inWidth=670;
  var inHeight=320;
  var newdiv;
  ShowFlash(false);
  removeBox('lightboxModeller');
  findPosForBL(document.getElementById('realbody'));
  lb+='<TABLE CELLSPACING="0" CELLPADDING="0">';
  lb+='<TR><TD><IMG SRC="/files/gfx/lightbox_nw.png"></TD><TD BACKGROUND="/files/gfx/lightbox_n.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD><IMG SRC="/files/gfx/lightbox_ne.png"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BGCOLOR="#ffffff" STYLE="padding-bottom:5px;"><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"><TR><TD CLASS="lightbow_header" VALIGN="bottom">'+inHdr+'</TD><TD ALIGN="right" VALIGN="top"><IMG SRC="/files/gfx/btn_close.png" WIDTH="30" HEIGHT="30" BORDER="0" USEMAP="#lightboxclose"><MAP NAME="lightboxclose"><AREA SHAPE="circle" ALT="Lukk" COORDS="15,13,11" HREF="./" ONCLICK="removeBox(\'lightboxModeller\');return false;"></MAP></TD></TR></TABLE></TD><TD BACKGROUND="/files/gfx/lightbox_e.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w_.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="2"></TD><TD BGCOLOR="#333333"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BACKGROUND="/files/gfx/lightbox_e_.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BGCOLOR="#ffffff" STYLE="padding-left:7px;padding-bottom:7px;"><IFRAME SRC="'+inObj+'"  WIDTH="'+inWidth+'" HEIGHT="'+inHeight+'" MARGINHEIGHT="0" MARGINWIDTH="0" FRAMEBORDER="0" SCROLLING="auto"></IFRAME></TD><TD BACKGROUND="/files/gfx/lightbox_e.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD><IMG SRC="/files/gfx/lightbox_sw.png"></TD><TD BACKGROUND="/files/gfx/lightbox_s.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD><IMG SRC="/files/gfx/lightbox_se.png"></TD></TR>';
  lb+='</TABLE>';
  newdiv=document.createElement('div');
  newdiv.setAttribute('id','lightboxModeller');
  newdiv.setAttribute('class','lightbow_frame');
  newdiv.setAttribute('className','lightbow_frame');
  newdiv.innerHTML='<DIV CLASS="lightbow_iframe" STYLE="padding-top:'+fpBLt+'px;">'+lb+'</DIV>';
  document.getElementById('lightbox').appendChild(newdiv);
}
function modeller_egenskaper(inID,inSub,inHdr,inSubs){
  var i=0;
  var lb='';
  var pageLinks='';
  var inObj='modeller_egeskaper.asp?id='+inID+'&sub='+inSub;
  var inWidth=670;
  var inHeight=315;
  var newdiv;
  ShowFlash(false);
  removeBox('lightboxModeller');
  findPosForBL(document.getElementById('realbody'));
  if(inSubs>1){
    pageLinks+='<TABLE CELLSPACING="0" CELLPADDING="0"><TR>';
    for(i=1;i<=inSubs;i++){pageLinks+='<TD><A ID="pop_h_'+i+'" HREF="#" CLASS="modeller_leaf'+'__'.substr(i,1)+'" ONCLICK=" modeller_egenskaper_showpart('+i+');return false;">'+i+'</A></TD><TD><IMG SRC="/files/gfx/spacer.gif" WIDTH="3" HEIGHT="1"></TD>';}
    pageLinks+='<TD><IMG SRC="/files/gfx/spacer.gif" WIDTH="7" HEIGHT="1"></TD></TR></TABLE>';
  }
  lb+='<TABLE CELLSPACING="0" CELLPADDING="0">';
  lb+='<TR><TD><IMG SRC="/files/gfx/modellerpop_nw.png"></TD><TD BACKGROUND="/files/gfx/modellerpop_n.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD><IMG SRC="/files/gfx/modellerpop_ne.png"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/modellerpop_w_.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BGCOLOR="#ffffff"><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"><TR><TD CLASS="modeller_popup" WIDTH="29"><IMG SRC="/files/gfx/logo_bw.png" WIDTH="29" HEIGHT="29" ALT="AlfaRomeo logo small" TITLE=""></TD><TD CLASS="modeller_popup" VALIGN="bottom" STYLE="padding-bottom:5px;padding-left:10px;">'+inHdr+'</TD><TD ALIGN="right" VALIGN="bottom" CLASS="modeller_popup">'+pageLinks+'</TD><TD WIDTH="30" ALIGN="right" VALIGN="top" CLASS="modeller_popup"><IMG SRC="/files/gfx/btn_close.png" WIDTH="30" HEIGHT="30" BORDER="0" USEMAP="#lightboxclose"><MAP NAME="lightboxclose"><AREA SHAPE="circle" ALT="Lukk" COORDS="15,13,11" HREF="./" ONCLICK="removeBox(\'lightboxModeller\');return false;"></MAP></TD></TR></TABLE></TD><TD BACKGROUND="/files/gfx/modellerpop_e_.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="6"></TD><TD BGCOLOR="white"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BACKGROUND="/files/gfx/lightbox_e.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD BACKGROUND="/files/gfx/lightbox_w.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD BGCOLOR="#ffffff" STYLE="padding-left:7px;padding-bottom:7px;"><IFRAME ID="modeller_egenskaper" SRC="'+inObj+'"  WIDTH="'+inWidth+'" HEIGHT="'+inHeight+'" MARGINHEIGHT="0" MARGINWIDTH="0" FRAMEBORDER="0" SCROLLING="auto"></IFRAME></TD><TD BACKGROUND="/files/gfx/lightbox_e.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD></TR>';
  lb+='<TR><TD><IMG SRC="/files/gfx/lightbox_sw.png"></TD><TD BACKGROUND="/files/gfx/lightbox_s.png"><IMG SRC="/files/gfx/spacer.gif" WIDTH="1" HEIGHT="1"></TD><TD><IMG SRC="/files/gfx/lightbox_se.png"></TD></TR>';
  lb+='</TABLE>';
  newdiv=document.createElement('div');
  newdiv.setAttribute('id','lightboxModeller');
  newdiv.setAttribute('class','lightbow_frame');
  newdiv.setAttribute('className','lightbow_frame');
  newdiv.innerHTML='<DIV CLASS="lightbow_modeller" STYLE="padding-top:'+fpBLt+'px;">'+lb+'</DIV>';
  document.getElementById('lightbox').appendChild(newdiv);
}
function modeller_egenskaper_showpart(inID){
  var i=0;
  try{for(i=1;i!=0;i++){document.getElementById('pop_h_'+i).setAttribute('class','modeller_leaf');document.getElementById('pop_h_'+i).setAttribute('className','modeller_leaf');}}catch(err){}
  try{document.getElementById('pop_h_'+inID).setAttribute('class','modeller_leaf_');document.getElementById('pop_h_'+inID).setAttribute('className','modeller_leaf_');}catch(err){}
document.getElementById('modeller_egenskaper').contentWindow.setpage(inID)
//  return false;
}

function removeBox(inObj){
  var i=0;
  var z=0;
  if(inObj==undefined){inObj='lightboxTopFrame'};
  for(i=0;i==0;z=0){try{document.getElementById('lightbox').removeChild(document.getElementById(inObj))}catch(err){i=1}};
  for(i=0;i==0;z=0){try{document.getElementById('lightbox').removeChild(document.getElementById('lightboxShaddow'))}catch(err){i=1}};
  ShowFlash(true)
}
function ShowFlash(hideme){
  var o;
  var i=0;
  var state=(hideme)?'visible':'hidden';
  o=document.getElementsByTagName('object');for(i=0;i<o.length;i++){o[i].style.visibility=state;}
  o=document.getElementsByTagName('embed');for(i=0;i<o.length;i++){o[i].style.visibility=state;}
  o=document.getElementsByTagName('select');for(i=0;i<o.length;i++){o[i].style.visibility=state;}
}
function findPosForBL(obj){
  fpBLl=0;
  fpBLt=0;
  if(obj.offsetParent){
    fpBLl=obj.offsetLeft
    fpBLt=obj.offsetTop
    while(obj=obj.offsetParent){fpBLl+=obj.offsetLeft;fpBLt+=obj.offsetTop}
  }
  return [fpBLl,fpBLt];
}
