/* $Header: /cvs/evision/src/www/b2b/lite/js/header.js,v 1.9 2010/02/19 08:35:38 aeg Exp $ */

function openWindow(url, width, height, scrollbars, wname, top, left) {
	var scrW = window.screen.availWidth;
	var scrH = window.screen.availHeight;
	var w, h, sb, wnm;
	if (!(w = width)) w = 640;
	if (!(h = height)) h = 480;
	if (!(sb = scrollbars)) sb = '1';
	var l = (left ? left : Math.round((scrW - w) / 2));
	var t = (top ? top : Math.round((scrH - h) / 2) - 20);
	if (!(wnm = wname)) wnm = '_blank';

	var sFeatures = "toolbar=0"
		+ ", directories=0"
		+ ", status=0"
		+ ", menubar=0"
		+ (", scrollbars=" + sb)
		+ ", resizable=1"
		+ (", width=" + w)
		+ (", height=" + h)
		+ (", left=" + l)
		+ (", top=" + t);

	var newWin = window.open(url, wnm, sFeatures);
	newWin.status = "";
	newWin.focus();
	return newWin;
}

function h_chC() {
	openWindow('/lite/chgc.jsp', 700, 600);
}

function h_chS() {
	openWindow('/lite/chgs.jsp', 700, 600);
}

function h_bc() {
	openWindow('/lite/bonusClubIntro.jsp', 512, 384, '0');
}

function h_needs() {
	openWindow('/lite/needs.jsp', 800, 600, '1');
}
function startPhoto(event){
	var coordX = event.clientX + 5;
	var coordY = event.clientY + 5;
	var photo = document.getElementById('acc_photo');
	if (photo && photo != null){
		photo.style.top = coordY;
		photo.style.left = coordX;
		photo.style.display = '';
	}
}
function stopPhoto(){
	document.getElementById('acc_photo').style.display = 'none';
}
function showManuals(){
	openWindow('/lite/manuals_list.jsp', '400', '300');
}
