// JavaScript Document


function swapImg(imgId, newImg) {
	if (document.images) {
		document[imgId].src=eval(newImg+'.src')
	}
}

var mac, macNav, pcNav
mac = (navigator.userAgent.indexOf('Mac') != -1)
if(mac) {
    macNav = (navigator.appName == "Netscape")
}
else {
    pcNav = (navigator.appName == "Netscape")
}
    

function openFullWindow(url){
	var windowHeight, windowWidth
    if (macNav) {
		windowHeight = screen.availHeight - 30
	} 
    else {
		windowHeight = screen.availHeight
	}
    if (pcNav) {
        windowWidth = screen.availWidth - 12
    }
    else {
        windowWidth = screen.availWidth
    }
	newWindow = window.open(url, 'mainWin', 'fullscreen,width=' + windowWidth + ',height=' + windowHeight + ',top=0,left=0')
	newWindow.focus()
}

function openNormal(url){
	screenH = screen.availHeight
	screenW = screen.availWidth
	// alert('screenH = ' + screenH + '; screenW = ' + screenW)
	topOffset = 0
	leftOffset = 0
	width1 = 900
	height1 = 702
	width2 = 900
	height2 = 702
	width3 = 900
	height3 = 702
    if(mac){
	winW = width1
	winH = height1
    } 
    else {
        if(pcNav){
        winW = width2
		winH = height2
        }
        else {  
        winW = width2
		winH = height2
        }
    }
	if(screenW > 800){
	leftOffset = (screenW - winW)/2
	topOffset = (screenH - winH)/2
	}
	newWindow = window.open(url, 'mainWin', 'resizable,width=' + winW + ',height=' + winH + ',top=' + topOffset + ',left=' + leftOffset + "'")
	newWindow.focus()
}

