//scripts

// highlight item
function setHighlight(obj, flag){
	if (flag){
	obj.className='aHighlightH';
	}
	else {
	obj.className='aHighlight';
	}
}

// photo popup 
function WinPopUpOld(URL, winwidth, winheight) {
	winwidth = winwidth + 10;
	winheight = Math.min(screen.height - 65, winheight);
	winleft = (screen.width / 2) - (winwidth / 2); // center the window right to left
	wintop = Math.max(0, (screen.height / 2) - (winheight / 2) - 35); // center the window top to bottom
	// show scrollbar only if we have reached max screen size
	if (wintop == 0){
	var scroll = "yes";
	}
	else {
	var scroll = "no";
	}
	var saveConfirm = window.open(URL, "_blank", 'top=' + wintop + ',left=' + winleft + ',height=' + winheight + ',width=' + winwidth + ',status=no, toolbar=no, menubar=no, location=no, resizable=no, scrollbars=' + scroll);
}


// photo popup 
function WinPopUp(title, URL, winwidth, winheight) {
	winwidth = winwidth + 13;
	winheight = winheight + 13;
	winleft = (screen.width / 2) - (winwidth / 2); // center the window right to left
	wintop = Math.max(0, (screen.height / 2) - (winheight / 2) - 35); // center the window top to bottom
	// show scrollbar only if we have reached max screen size
	if (wintop == 0){
	var scroll = "yes";
	}
	else {
	var scroll = "no";
	}
	var PicWin = window.open("", "_blank", 'top=' + wintop + ',left=' + winleft + ',height=' + winheight + ',width=' + winwidth + ',status=no, toolbar=no, menubar=no, location=no, resizable=no, scrollbars=' + scroll);

		htmlText = ''
		htmlText = htmlText + '<html><head><title>SignGraphx Gallery - ';
		htmlText = htmlText + title
		htmlText = htmlText + '&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</title></head><body style="background-color:#999999; margin: 5px; " onblur="self.close()">';
		htmlText = htmlText + '<table border="0" cellspacing="0" cellpadding="0"><tr><td onClick="window.close()"><img src="';
		htmlText = htmlText + URL
		htmlText = htmlText + '" alt="click on the image to close this window" border="1"></td>	</tr></table>';
		htmlText = htmlText + '</body></html>';

		PicWin.document.write(htmlText);
		PicWin.document.close();
}
