//		js for flash trash and trash zone

//		Note: scripting for the full-screen window is borrowed
//				from code I developed, with the assistance of
//				Henry Dawson of escaplab.com.au  The script opens
//				a full-screen browser window for scalable flash
//				content.

var wincnt = 0;
function makePop() {
	for (i=0; i<15; i++) {
		var intvl = Math.floor(Math.random() * 100) + 500;
		var intervalId = window.setTimeout("openPop();window.clearTimeout(intervalId);", intvl);
		//openPop();
	}
	return true;
}

function openPop() {
	var randX = Math.floor(Math.random() * 400) + 50;
	var randY = Math.floor(Math.random() * 350) + 50;
	var winOpt = 'toolbar=0,left=' + randX + ',top=' + randY + ',location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=120,height=150';
	wincnt += 1;
	winNbr = "pop" + wincnt;
	window.open('poppop.htm',winNbr, winOpt);
}

function detectVersion()
 {
 version = parseInt(navigator.appVersion);
 return version;
 }

function detectOS()
 {
 if(navigator.userAgent.indexOf('Win') == -1) {
 	OS = 'Macintosh';
 } else {
 	OS = 'Windows';
 }
 return OS;
 }

function detectBrowser()
 {
 if(navigator.appName.indexOf('Netscape') == -1) {
 	browser = 'IE';
 } else {
 	browser = 'Netscape';
 }
 return browser;
 }

function doWindow(){

 var adjWidth;
 var adjHeight;

 if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape')) {
 	adjWidth = 20;
 	adjHeight = 35;
 }
 if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE')) {
 	adjWidth = 20;
 	adjHeight = 35;
 	winOptions = 'fullscreen=yes';
 }
 if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape')) {
 	adjWidth = 30;
 	adjHeight = 30;
 }
 if((detectOS() == 'Windows') && (detectBrowser() == 'IE')) {
 	adjWidth = 10;
 	adjHeight = 32;
 }
 if(detectVersion() < 4) {
 	self.location.href = 'oldbrowser.html';
 } else {
	var winWidth = screen.availWidth - adjWidth;
 	var winHeight = screen.availHeight - adjHeight;
 	var winSize = 'width=' + winWidth + ',height=' + winHeight + ',scrollbars=no,resizable=yes,top=0,left=0';
 	var thewindow = window.open('art36/flashmain.html', 'flashmain', winSize);
 	thewindow.moveTo(0,0);
 }
 }

function fullScreen(){
 	onload=doWindow();
}