/*
var element = document.getElementById ? function(id){return document.getElementById(id)} : document.layers ? function(id){return document.layers[id]} : function(id){return document.all[id]}

function floatMenu()
{
  var t = element('topMenu')
  if(t) t.style.top = document.documentElement.scrollTop 
}


if(document.all && document.documentElement){
  window.onscroll = floatMenu
}
*/
// Pop-Up

var popUp=null
var foto1=null

function popUpShop(img){
  popUpAll(img,"shop","")
}
function popUpShop2(img,end){
  popUpAll(img,"shop",end)
}
function popUpImg(img){
  popUpAll(img,"","")
}
function popUpImg2(img,end){
  popUpAll(img,"",end)
}
function popUpAll(img,shop,end){
  foto1= new Image()
  url="/large/"+img+end+".jpg"
  foto1.src=url
  getPopUp(url,img,shop)
}
function getPopUp(url,img,shop){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(url,img,shop)
  } else {
    func="getPopUp('"+url+"','"+img+"','"+shop+"')"
    interval=setTimeout(func,20)
  }
}
function viewFoto(url,img,shop){
  width=foto1.width+40
  height=foto1.height+140
  options="width="+width+",height="+height
  popUp = openPopUp(url,img,options,shop)
}
function closePopUp()
{
  if(popUp){
    popUp.close()
    popUp = null
  }
}

function openPopUp(url,img,options,shop){
 var title=img.charAt(0).toUpperCase()+img.substring(1,img.length)
 var shopper=""
 if(shop!="" && shop!='""'){
  shopper=
" <input type=button value='Shop for the \""+title+"\"' "+
"onclick='opener.location.href=\"/order/"+img+".html\"';"+
"window.close()'></input>"
 }
 var popUp = window.open("",title,options)
 popUp.blur()
 var frameString=
  "<html>"+"<head>"+"<title>"+title+"</title>"+"</head>"+
  "<body><center>"+
  "<h1>"+title+"</h1>"+
  "<a href='javascript:window.close();popUp=null'>"+
   "<img src='"+url+"' border='0' "+
   "alt='Click to close window'>"+"</a>"+
  "<form action='' method='get'>"+
  "<input type=button value='Close Window' onclick='window.close()'></input>"+shopper+"</form></p>"+
  "</center></body>"+"</html>"
 popUp.document.open()
 popUp.document.write(frameString)
 popUp.document.close()
 popUp.focus()
 return popUp
}
