﻿// JScript File

//DetectImageSize function, not used yet. Must first solve preloading of images using javascript
   function DetectImageSize(picName,picTitle){
      picURL=picName.src
      newWindow=window.open(picURL,'newWin','toolbar=no,width='+picName.width+',height='+picName.height)
      newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body background="'+picURL+'"><\/body><\/html>')
      newWindow.resizeBy(picName.width-newWindow.document.body.clientWidth,picName.height-newWindow.document.body.clientHeight)
      newWindow.focus()
   } 

function openWindow(url, name, ImgWidth, ImgHeight)
{
//	window.open(url,name,'toolbars=no,menubar=no,scrollbars=no,location=no,status=no,resizable=yes,width='+ImgWidth+',height='+ImgHeight);
window.open(url,name,'toolbars=no,menubar=no,scrollbars=no,location=no,status=no,resizable=yes,width=800,height=600');

}

function divOpen(divId) {

    var theElement = document.getElementById(divId);
    theElement.style.visibility = "visible";
}

function divClose(divId) {

    var theElement = document.getElementById(divId);
    theElement.style.visibility = "hidden";
}

function winPopupCenter(hojd, bredd, loc) {

    var x, y;

    y = (screen.height / 2) - (hojd / 2);
    x = (screen.width / 2) - (bredd / 2);


    var features = "width=" + bredd + ",height=" + hojd + ",top=" + y + ",left=" + x + ",scrollbars=yes" + ",toolbar=no";
    var w = window.open(loc, "smallshopwin", features);
    w.focus();

}