<!--

var PicWin

function openPicWin() {
	// theIMG,theWidth,theHeight,theOptions
	a = openPicWin.arguments;
	theIMG = a[0];
	theWidth = a[1];
	theHeight = a[2];
	
	if (navigator.appName == "Netscape"){
		theWidth += 10;
		theHeight += 57;
	}else{
		theWidth += 15;
		theHeight += 35;
	}
	
	theOptions = "";
	if (a[3]) {theOptions = "," + a[3]; }
	theURL = "picWin.asp?img=~pics/" + theIMG;
	theName = "PicWin";
	theFeatures = "resizable=yes,width=" + theWidth + ",height=" + theHeight + theOptions;

	if (window.screen) {
    	var ah = screen.availHeight - 30;
	    var aw = screen.availWidth - 10;

	    var xc = (aw - theWidth) / 2;
	    var yc = (ah - theHeight) / 2;
		// var xc = 0;
		// var yc = 0;

	    winPosX =",left=" + xc + ",screenX=" + xc;
	    winPosY = ",top=" + yc + ",screenY=" + yc;
		theFeatures += (winPosX + winPosY);
		//alert(winPos);
	}

 	PicWin = window.open(theURL,theName,theFeatures);
	self.PicWin.resizeTo(theWidth,theHeight);
	self.PicWin.focus();
}

function newsPopUp(){
	var winPos;
	winName = "newsWin";
	winURL = "news.html";
	winFeatures = "'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no";
	winWidth = 420;
	winHeight = 400;
	if (navigator.appName == "Netscape") winWidth = 500;
	
	winFeatures += ",width=" + winWidth + ",height=" + winHeight + "'";

	if (window.screen) {
    	var ah = screen.availHeight - 30;
   		var aw = screen.availWidth - 10;

    	//var xc = (aw - winWidth) / 2;
    	//var yc = (ah - winHeight) / 2;
		var xc = 0;
		var yc = 0;

    	winPosX =",left=" + xc + ",screenX=" + xc;
    	winPosY = ",top=" + yc + ",screenY=" + yc;
		winFeatures += (winPosX + winPosY);
		//alert(winPos);
	}
    
	window.open(winURL,winName,winFeatures);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function i2i_DoFSCommand (command, args){
	if (command == "newsPopUp") {
		newsPopUp();
	}
	if (command == "openPicWin") {
		openPicWin(args);
	}
}

// -->

