/*	Script name:	popwin.js
 *	Description:	pops window, resizes and focuses
 */

function openWindow(url, name, style) {
    var win = window.open(url, name, style="width=750,height=550,resizable=1,scrollbars=1,menubar=1,location=1,toolbar=1,directories=1,status=1");
    win.focus();
    return win;
}

function openDoc(url, name, style) {
    var win = window.open(url, name, style="width=750,height=550,resizable=1,scrollbars=1");
    win.focus();
    return win;
}

/* browser to image */

function popImg(simagePath) {
    window.open("include/js/b2i.php?"+simagePath,"","height=200,width=200,resizable=1");
}

var arrTemp=self.location.href.split("?");
var imagePath=(arrTemp.length>0)?arrTemp[1]:"";
var NS=(navigator.appName=="Netscape")?true:false;
var NS=((!document.all)||window.opera)?true:false;

function b2i() {
    var iWidth=(NS)?window.innerWidth:document.documentElement.clientWidth;
    var iHeight=(NS)?window.innerHeight:document.documentElement.clientHeight;
    iWidth=document.images[0].width-iWidth;
    iHeight=document.images[0].height-iHeight;
    window.resizeBy(iWidth,iHeight);
    self.focus();
}

/* browser to image */
