//function MM_reloadPage(init) {  //reloads the window if Nav4 resized
 // if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
 //   document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
 // else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
//}
//MM_reloadPage(true);
//
function popup(name,width,height)
		{
			var popup = window.open("","Images","width=" + width + ",height=" + height + ",toolbar=0, status=0, menubar=0, resizable=0, scrollbars=no, directories=0, dependent=yes");
			popup.resizeTo(width,height);
			popup.document.open();
			popup.document.write("<html><title>GRimmy3D</title><body bgcolor='#FFFFFF' bottommargin=0 rightmargin=0 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table width='100%' height='100%' border=0 cellspacing=0 cellpadding=0><tr><td align='center' valign='middle'><a href='javascript:self.close();'><img src='" + name + " 'border=0 alt='Click anywhere to close.'></a></td></tr></table></body></html>");
			popup.document.close();
			popup.moveTo((screen.width-width)/2, (screen.height-height)/2); 
			popup.focus()
		}
		
function legal()
{
window.open('legal.html','Legal','width=400,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

var locationAfterPreload = "tehmain.shtml" 	// URL of the page after preload finishes
var lengthOfPreloadBar = 180 				// Length of preload bar
var heightOfPreloadBar = 3 					// Height of preload bar
// Put the URLs of images that you want to preload below
var yourImages = new Array("gfx/prints_bck.jpg","gfx/bck.jpg","gfx/about_bck.jpg","gfx/brushes.gif","gfx/ca.jpg","gfx/hdr01.jpg","gfx/hdr02.jpg","gfx/hdr03.jpg","gfx/hdr04.jpg","gfx/hdr04_o.jpg","gfx/hdr05.jpg","gfx/hdr05_o.jpg","gfx/hdr06.jpg","gfx/hdr06_o.jpg","gfx/hdr07.jpg","gfx/hdr07_o.jpg","gfx/hdr08.jpg","gfx/hdr08_o.jpg","gfx/hdr09.jpg","gfx/hdr09_o.jpg","gfx/hdr010.jpg","gfx/hdr010_o.jpg","gfx/hdr011.jpg","gfx/hdr011_o.jpg","gfx/m1.jpg","gfx/m2.jpg","gfx/m3.jpg","gfx/m4.jpg","gfx/photos.gif","gfx/tutbydub.jpg","gfx/v3.jpg","gfx/zip.gif","gfx/4041.jpg","gfx/4042.jpg","gfx/4043.jpg","gfx/4044.jpg","gfx/by.jpg")
// Do not modify anything beyond this point!
if (document.images) {
var dots = new Array() 
dots[0] = new Image(1,1)
dots[0].src = "gfx/load1.gif" // default preloadbar color 
dots[1] = new Image(1,1)
dots[1].src = "gfx/load2.gif" // color of bar as preloading progresses
var preImages = new Array(),coverage = Math.floor(lengthOfPreloadBar/yourImages.length),currCount = 0
var loaded = new Array(),i,covered,timerID
var leftOverWidth = lengthOfPreloadBar%coverage
}
function loadImages() { 
for (i = 0; i < yourImages.length; i++) { 
	preImages[i] = new Image()
	preImages[i].src = yourImages[i]
}
for (i = 0; i < preImages.length; i++) { 
	loaded[i] = false
}
checkLoad()
}
function checkLoad() {
if (currCount == preImages.length) { 
	location.replace(locationAfterPreload)
	return
}
for (i = 0; i <= preImages.length; i++) {
	if (loaded[i] == false && preImages[i].complete) {
		loaded[i] = true
		eval("document.img" + currCount + ".src=dots[1].src")
		currCount++	}
}
timerID = setTimeout("checkLoad()",10) 
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function tutGrunge()
{
window.open('tutorials/grunge/grunge.html','Grunge','width=535,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutActions()
{
window.open('tutorials/actions/actions.html','Actions','width=450,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutOldphoto()
{
window.open('tutorials/oldphoto/oldphoto.html','OldPhotos','width=500,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutBlending()
{
window.open('tutorials/blending/blending.html','Blending','width=535,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutText()
{
window.open('tutorials/articles/text.html','Text','width=535,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutDesign()
{
window.open('tutorials/articles/inspired.html','Design','width=535,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutColor()
{
window.open('tutorials/color/color.html','Color','width=535,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutEnhance()
{
window.open('tutorials/enhance/enhance.html','PhotoEnhance','width=535,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutFaceswap()
{
window.open('tutorials/faceswap/faceswap.html','FaceSwap','width=560,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutTape()
{
window.open('tutorials/tape/tape.html','Tape','width=450,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutThirds()
{
window.open('tutorials/thirds/thirds.html','Thirds','width=450,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutBrushes()
{
window.open('tutorials/brushes/brushes.html','Brushes','width=480,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutManip()
{
window.open('tutorials/manip/manip.html','Manip','width=535,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function tutCopyright()
{
window.open('tutorials/articles/ripped.html','Design','width=535,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function Contest()
{
window.open('contest.html','Contest','width=517,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

function FAQ()
{
window.open('faq.html','READTHEMANUAL','width=517,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no'); 
}

// Clock Script Generated By Maxx Blade's Clock v1.3
// http://www.maxxblade.co.uk/clock
function f(x){ return (x>9)?x:'0'+x; }
var fr=0;
function wT(){ return new Date(); }
function fY(x){ return (x<500) ? x+1900 : x; }
var dN=new Array('Sunday','Monday','Tueday','Wednesday','Thursday','Friday','Saturday');
var mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
var tTt="dN[wT().getDay()]+' '+wT().getDate()+' '+mN[wT().getMonth()]+','+' '+fY(wT().getYear())+' '+' '+' '+f(wT().getHours())+':'+f(wT().getMinutes())+':'+f(wT().getSeconds())";
function dT(){
tT=eval(tTt);
if(fr==0){ fr=1; document.write('<span id="ts">'+tT+'</span>'); }
ts.innerText=tT;
setTimeout('dT()',1000);
}