<!--

function Popup(fn,w,h,c,sC){
  if (sC == '' ) sC ="Flugskóli Helga Jónssonar"
  sC ="'&copy; Copyright: "+sC+"'";
  X = w+10;
  Y = h+59;
  sOverflow = "visible"  
  sTopLeft = ""

  if (X > screen.width - 28){
    X = screen.width - 28;
    Y = Y + 18
    sOverflow = "auto"
    sTopLeft += ",left=5"
  }

  if (Y > screen.height - 40){
    Y = screen.height - 40;
    X = X + 18;
    sOverflow = "auto"
    sTopLeft += ",top=5"
  } 

  pop = window.open("", 'Photos',"location=no,menubar=no,resizable=no,scrollbars=no,status=yes,toolbar=no,width="+X+",height="+Y+"screenX="+X+",screenY="+Y+sTopLeft);
  pop.resizeTo(X,Y);
  if (sTopLeft !="")
    pop.moveTo((screen.width-X)/2,(screen.height-Y)/2-15)
  pop.document.open();
  pop.document.write('<html><title>Myndir / Photos</title><body topmargin="0" leftmargin="0" bgcolor="black" onLoad="window.status='+sC+'" onkeypress="if (event.keyCode == 27) window.close();">');
  pop.document.write('<div style="overflow: '+sOverflow+';position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;">');
  pop.document.write('<img src="'+fn+'" width="'+w+'" height="'+h+'">');
  pop.document.write('<div style="position: absolute; top: 6px; left: 6px"><table width="'+(w-11)+'" height="'+(h-20)+'" style="font-family: Verdana, Arial, sans-serif;font-size: 10px; font-weight: bold; color: black;text-decoration: none"><tr><td valign=bottom align=center>'+c+'</td></tr></table></div>');
  pop.document.write('<div style="position: absolute; top: 5px; left: 5px"><table width="'+(w-11)+'" height="'+(h-20)+'" style="font-family: Verdana, Arial, sans-serif;font-size: 10px; font-weight: bold; color: white;text-decoration: none"><tr><td valign=bottom align=center>'+c+'</td></tr></table></div>');
  pop.document.write('<div style="font-family: Verdana, Arial, sans-serif;font-size: 10px; font-weight: bold; color: black;position: absolute; top: '+(h-12)+'px; left: '+(w-31)+'px">loka</div>');
  pop.document.write('<div style="position: absolute; top: '+(h-13)+'px; left: '+(w-32)+'px">');
  pop.document.write('<a href="Javascript:self.close()" style="font-family: Verdana, Arial, sans-serif;font-size: 10px; font-weight: bold; color: white;text-decoration: none">loka</a>');
  pop.document.write('</div></body></html>');
  pop.document.close();
  pop.focus();
}

function Set_Cookie(name,value,expires,path,domain,secure) {
    document.cookie = name + "=" +escape(value) +
        ( (expires) ? ";expires=" + expires.toGMTString() : "") +
        ( (path) ? ";path=" + path : "") + 
        ( (domain) ? ";domain=" + domain : "") +
        ( (secure) ? ";secure" : "");
}
function openMap(url)
{
  windowLook = "width=366,height=410, toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizeable=no"
  url = url.replace( /!/gi, "%" )
  window.open( url, "map", windowLook )
}

if (parent.location == self.location) {
   var todays_date = new Date();
   var expires_date = new Date(todays_date.getTime() +(60000)); // 1 mínúta
   Set_Cookie('putinmain',self.location,expires_date);
   parent.location = 'http://'+parent.location.hostname;
}
//-->