<!--
/**************************************************

Author: Eric King
URL: http://redrival.com/eak/index.shtml
Name of script:
EAK's ViewPic Script
leave this info in if you want to use the script.
do not alter or edit this script with out written
permision.

**************************************************/

var win=null;

function ViewPic(myImg,myname,w,h,pos){

if(pos=="random"){
LeftPosition=(screen.width)?Math.floor(Math.random()*((screen.width-w)-75)):100;
TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}

if(pos=="center"){
LeftPosition=(screen.width)?(screen.width-w)/2:100;
TopPosition=(screen.height)?(screen.height-h)/2:100;}

else if((pos!="center" && pos!="random") || pos==null){
LeftPosition=0;
TopPosition=20}

settings='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no';
win=window.open("",myname,settings);
var picwin=win.document;
picwin.open();
picwin.write('<html><head><title>Thomas Gallery</title>');
picwin.write('<style type="text/css"><!--\n'+
'div{font-family:"Trebuchet MS",MS Sans Serif, Geneva, sans-serif;font-size:'+(18)+'px;font-weight:300;}'+
'// --></style>');
picwin.write('<scr'+'ipt language="javascript" type="text/javascript">'+
'<!--\n'+'ns4=(document.layers)?1:0;\n'+'ie4=(document.all)?1:0;\n'+
'function doit(){\n'+'if(ns4){document.loading.visibility="hide";}\n'+
'else if(ie4){document.all.loading.style.visibility="hidden";}}\n'+'// --></sc'+'ript>');
picwin.write('</head><body onload="doit()" bgcolor="gray" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onBlur="self.close()">');
picwin.write('<div id="loading" style="position:absolute;top:0;left:0;z-index:10;'+
'width:'+w+';height:'+h+';clip:rect(0px '+w+'px '+h+'px 0px);'+
'layer-background-color:gray;background-color:gray;padding:10px;">'+
'<font="verdana" style="size: 12px">'+
'Photo loading, please wait. . . .</div>');
picwin.write('<img src="'+myImg+'" width="'+w+'" height="'+h+'" border="0" alt="">');
picwin.write('</body></html>');
picwin.close();
if(window.focus){win.focus();}}
// -->
