// Site DJ Preloads:
// Pre-loading the upcoming images for cache...
var djimg99 = new Image(); djimg99.src = 'images/bg.gif';
var djimg1 = new Image(); djimg1.src = 'images/mnuCorporateOn.gif';
var djimg2 = new Image(); djimg2.src = 'images/mnuMessageOn.gif';
var djimg3 = new Image(); djimg3.src = 'images/mnuShareholdersOn.gif';
var djimg4 = new Image(); djimg4.src = 'images/mnuLocationOn.gif';
var djimg5 = new Image(); djimg5.src = 'images/mnuEventsOn.gif';
var djimg6 = new Image(); djimg6.src = 'images/mnuMembershipsOn.gif';
var djimg7 = new Image(); djimg7.src = 'images/mnuFaqOn.gif';
var djimg8 = new Image(); djimg8.src = 'images/mnuSitemapOn.gif';
var djimg9 = new Image(); djimg9.src = 'images/lblCorporateOn.gif';
	
// Site DJ Functions:
/*function doTarget(tName) {
	document.label.src='images/lblCorporateOn.gif';
	document.target.src='images/target'+tName+'.gif';
}
function doTargetMain(tName) {
	document.label.src='images/lblCorporateOff.gif';
	document.target.src='images/target'+tName+'.gif';
}*/
function rollOver(imgNum) {
	switch(imgNum) {
		case 1:document.img1.src='images/arrowUpOn.gif';break;
		case 2:document.img2.src='images/arrowDownOn.gif';break;
	}
}
function rollOut(imgNum) {
	switch(imgNum) {
		case 1:document.img1.src='images/arrowUpOff.gif';break;
		case 2:document.img2.src='images/arrowDownOff.gif';break;
	}
}

function plmOnLoad() {
    if (typeof djRePos == "function") djRePos();
    if (typeof getcontent_height == "function") getcontent_height();
}

function djRePos() {
	return;
	var minWidth = 984;
	var minHeight = 576;

	var winWidth = document.body.clientWidth;
	var winHeight = document.body.clientHeight;

	var theContainer = document.all['container'];
	if (theContainer){
	    if(winHeight > minHeight) {
		    var topPos = (winHeight) ? (winHeight - 300)/2 : 0;	
		    document.all['container'].style.top = (topPos - 60) + "px";
	    }

	    if(winWidth > minWidth) {
		    var leftPos = (winWidth) ? (winWidth - 675)/2 : 0;
		    document.all['container'].style.left = (leftPos + 130) + "px";
	    } else {
		    if(winHeight > minHeight) {
			    var topPos = (winHeight) ? (winHeight - 300)/2 : 0;	
			    document.all['container'].style.top = (topPos - 52) + "px";
		    }
	    }
	}
}

function fullView(x, wid, hei, caption)
{
    if (hei == null) hei = 500;
    if (wid == null) wid = 700;
    if (caption == null) caption = "";
    LeftPosition = (screen.width) ? (screen.width - 700)/2 : 0;
    TopPosition = (screen.height) ? (screen.height - 500)/2 : 0;
    var w = window.open('', 'fullView', 'width=700,height=500,top='+
    	TopPosition + ',left=' + LeftPosition +
	',scrollbars=no,dependent=no,directories=no,hotkeys=no,location=no,menubar=no,personalbar=no,resizble=no,status=no,titlebar=no,toolbar=no');
	w.document.write("<html><head><title>" +
	caption + "</title></head><body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0'><center><img src='images/" +
	x + ".jpg' width='" +
	wid + "' height='" +
	hei + "', border='0'><br><font face='verdana' size='2'>" +
	caption + "</font><br><div align='right'><font face='verdana' size='1'><a href='javascript:window.close();'>[CLOSE WINDOW]</a>&nbsp;&nbsp;&nbsp;</font></div></center></body></thml>");
}
function fullImage(path, wid, hei, caption)
{
    if (caption == null) caption = "";
    if (hei == null) hei = 500;
    if (wid == null) wid = 600;
    var ww = wid;
    if (ww < 600) ww = 600;
    LeftPosition = (screen.width) ? (screen.width - ww)/2 : 0;
    TopPosition = (screen.height) ? (screen.height - (hei+50))/2 : 0;
    var w = window.open('/doc/fullView.html', 'fullImage', 'width='+ww+',height='+(hei+50)+',top='+
    	TopPosition + ',left=' + LeftPosition +
	',scrollbars=no,dependent=no,directories=no,hotkeys=no,location=no,menubar=no,personalbar=no,resizble=no,status=no,titlebar=no,toolbar=no');
	w.document.write("<html><head><title>" +
	caption + "</title></head><body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0'><center><img src='"+ path + "' width='" +
	wid + "' height='" +
	hei + "', border='0'><br><font face='verdana' size='2'>" +
	caption + "</font><br><div align='right'><font face='verdana' size='1'><a href='javascript:window.close();'>[CLOSE WINDOW]</a>&nbsp;&nbsp;&nbsp;</font></div></center></body></thml>");
}
function menu_DoFSCommand(command, args)
{
    // Fix 'args' so first character is capitalized.
    if (args != ""){
	args = args.charAt(0).toUpperCase() + args.substring(1, args.length);
    }
    if(command=="doTarget" && args.substring(0,4) != "Hist"
			   && args != "" && args != null 
                           && args.substring(0,2) != "19" 
			   && args.substring(0,2) != "20"){
	if (document.target)
	    document.target.src='images/target'+args+'.gif';
    }
}
function mailermagic() {
    LeftPosition = (screen.width) ? (screen.width - 1000)/2 : 0;
    TopPosition = (screen.height) ? (screen.height - 550)/2 : 0;
    window.open('http://corp.plmgroup.com/mailermagic/','mm','width=1000,height=500,top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,dependent=no,directories=no,hotkeys=yes,location=yes,menubar=yes,personalbar=yes,resizable=yes,status=yes,titlebar=yes,toolbar=yes');
}

function optium() {
    LeftPosition = (screen.width) ? (screen.width - 1000)/2 : 0;
    TopPosition = (screen.height) ? (screen.height - 550)/2 : 0;
    window.open('http://www.optium.ca','optium','width=1000,height=500,top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,dependent=no,directories=no,hotkeys=yes,location=yes,menubar=yes,personalbar=yes,resizable=yes,status=yes,titlebar=yes,toolbar=yes');
}

function openWinCenter(pageLink,pageTitle,pageWidth,pageHeight) {
    LeftPosition = (screen.width) ? (screen.width - pageWidth)/2 : 0;
    TopPosition = (screen.height) ? (screen.height - pageHeight)/2 : 0;
    window.open('http://www.plmgroup.com/'+pageLink,pageTitle,'width='+pageWidth+',height='+pageHeight+',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=no,dependent=no,directories=no,hotkeys=no,location=no,menubar=no,personalbar=no,resizable=no,status=no,titlebar=yes,toolbar=no');
}

function openNewWinCenter(pageLink,pageTitle,pageWidth,pageHeight) {
    LeftPosition = (screen.width) ? (screen.width - pageWidth)/2 : 0;
    TopPosition = (screen.height) ? (screen.height - pageHeight)/2 : 0;
    window.open(pageLink,pageTitle,'width='+pageWidth+',height='+pageHeight+',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=no,dependent=no,directories=no,hotkeys=no,location=no,menubar=no,personalbar=no,resizable=no,status=no,titlebar=yes,toolbar=no');
}

function openCMA() {
    LeftPosition = (screen.width) ? (screen.width - 1000)/2 : 0;
    TopPosition = (screen.height) ? (screen.height - 550)/2 : 0;
    window.open('http://demo.plmgroup.com/poddemo','cma','width=1000,height=500,top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,dependent=no,directories=no,hotkeys=yes,location=yes,menubar=yes,personalbar=yes,resizable=yes,status=yes,titlebar=yes,toolbar=yes');
}