/*
	@date: 2002/04/24
	@version: 1.0
	@description: Site Office menu scripts
	@testing: IE 5,6,Mac 5; Netscape 6.1,6.2,Mac 6.2
	@updates:
*/

// -- these vars set the basic menu properties --
var MenusAtTop = true;   // false if menus are down the left (i.e. fixed leftpos, variable toppos)
var MenusTopPos = 125; 	 // only used if MenusAtTop = true; fixed top position
// not used var MenusLeftPos = 0; 	 // only used if MenusAtTop = false; fixed left position
var MenuLeftOffset = 150; // added to dynamic left pos

var MenusLeftOffset =2; // added to dynamic left pos
var MenusTopOffset = 5; // only used if MenusAtTop = false; added to dynamic top pos
// -------------

var False = false;
var True = true;

function findClientWidth() {
    if (document.getElementById) {
        return document.body.clientWidth;
    } // else is NN4 && W3C
    return innerWidth;
}

function AdjustSiteLeftPos() {
//	var browser_width = findClientWidth()
//	if(browser_width > 750) {
//		var adj = browser_width - 750
//		adj = adj / 2
//		MenuLeftOffset+=adj
//		MenuLeftOffset-=5	//adjust for body margin
//	}
}

// browser version class
function BrowserVer(){

	this.isIE = false;
	this.isNN = false;
	this.isMac = false;
	this.browseVer = 0;
	this.platform = '';

	if( document.all )
		this.isIE = true;
	else
		this.isNN = true;

	if( navigator.appVersion.search(/Mac/) > -1 ) this.isMac = true;

	if( this.isIE ){
		// get version number for IE
		var tmpArr = navigator.userAgent.split(';');

		if( document.getElementById ){
			this.browseVer = tmpArr[tmpArr.length - 2].replace(/MSIE/i, '');
			this.platform = tmpArr[tmpArr.length - 1].replace(/\)/,'');
		}
		else{
			var tmpArr = navigator.userAgent.split(';');

			this.browseVer = tmpArr[1].replace(/MSIE/i, '');
			this.platform = tmpArr[2].replace(/\)/,'');

		}

		this.platform = this.platform.replace(/windows /i, 'Win');

	}
	else{
		// get version number for NN
		var tmpArr = navigator.userAgent.split('/');
		this.browseVer = tmpArr[tmpArr.length - 1];

		tmpArr = navigator.userAgent.split(';');
		this.platform = tmpArr[2];

	}

}

var bv = new BrowserVer();

var max = 5;
var browserVer = parseInt(navigator.appVersion);
/*
if( document.all )
	var isIE = true;
else
	var isIE = false;
*/
isIE = bv.isIE;

if( document.getElementById )
	var isW3C = true;
else
	var isW3C = false;

var gMenuTop = 40;

var i = 1, j = 0;
//var cumulativeX = 0;
var currX = 0, currY = 0;
/*
var strStyle = 'position: absolute; z-index: 40; visibility: hidden; ';
var tmpStr;
var tmpStr2;
var tmpStr3;

var strURL = '';
var strCmd = '';
var lstLevIDs;
var arrLinkType;
var arrLevel;
var arrURL;
var arrID;
var flgDoc = '';*/
var dontShow = new Array(max + 1);
// var strDivName;
// var visibleMenus = new Array(); // array of references to visible menu divs (not level 2s)
var cancelled = new Array(); // array of booleans used to decide to hide sub menu div on td out
var posLeft = 0;
var loaded;
var mnuactive
var booMenu
// menu properties
var mnuBgColor = '#FFDE9E; ';
var objLastTR = new Array();
var objTRLast;

var currentVisibleDiv = new Array();

booMenu = false;
loaded = false;

for(i = 1; i <= 5; i++)
	currentVisibleDiv[i] = null;

for(i = 0; i <= 5; i++)
	cancelled[i] = false;

function bodyOnLoad(){
	var lstTmp;
	


	if(document.getElementById) lstTmp = document.getElementsByTagName('body');

	AdjustSiteLeftPos();

	loaded = true;
}

function BigPicLink(picID, w, h, newWin){
	if( newWin )
		ShowPopUpWindow("BigPic","bigpic.cfm?pic_id="+picID,w,h,"no","no","yes");
	else
		document.location.href = 'popup_pic.cfm?pic_id=' + picID;
}


function bodyMouseOver(){
	gMenuTop = 40;	
	
	if(document.all) {	
		
		if((loaded)&&(mnuactive)){	
		
			hideAllMenus();
			
		}
	}
	else {		
		if((!booMenu)&&(loaded)&&(mnuactive)){			
			hideAllMenus();
						
		}
	}

}



function getItem(itemID){

	if(document.getElementById)
		return (document.getElementById(itemID));
	else
		return (document.all(itemID));

}

function showLev2Over(parentID, thisID, objThis){

	gMenuTop = 90;

	showMnuLevel(3, objThis, thisID);

}

function showLev2Out(parentID, thisID, objThis){


}

// This function adds an event listener to every menu div in NS6 so stopPropagation can be called
// preventing the div from hiding on the body mouse over.
function mouseMenuShow(tmpLevel, obj, parentID, divName){

	
	
	if(loaded){
		
		
		showMnuLevel(tmpLevel, obj, parentID, divName);
	}
	
	
}

function divMenuMouseOver(e){
	var idTmp = '';
	var levTmp;

	if(document.getElementById){ // cancel event propagation in ie 5 and ns 6
		if(document.all){
			window.event.cancelBubble = true;
			idTmp = e.id;
			idTmp = idTmp.replace('level', '');
			levTmp = parseInt(idTmp);
			cancelled[levTmp] = true;
		}
		else {
			booMenu = true;
			e.stopPropagation = true ;
		}
	}
	else if(document.all) {
		e.style.width = e.children[0].offsetWidth;
		window.event.cancelBubble = true;
	}
}

function divMenuMouseOut(e) {
	booMenu = false;
}





function tdMouseOver(thisObj, divChild, CascadeLeft, tmpLevel) {
	var x = 0;
	var idTmp;
	var idNum;
	var divTmp;
	var i;
	var t;
	var lstTmp;
	var posTop;
//	var strCmd;

	//window.status = tmpLevel;
	mnuactive = true;	

	if(document.getElementById){ // ie5 and ns 6
		if(tmpLevel){
			idNum = tmpLevel;
		}
		else{
			idTmp = thisObj.parentNode.parentNode.parentNode.parentNode.id;
			idTmp = idTmp.replace('level', '');
			idNum = parseInt(idTmp);
		}

		thisObj.className = 'menu' + idNum + 'over';
		thisObj.firstChild.className = 'menu' + idNum + 'over';

		lstTmp = thisObj.parentNode.getElementsByTagName("td");
		lstTmp[0].className = 'menu' + idNum + 'over';
		lstTmp[1].className = 'menu' + idNum + 'over';
		lstTmp[2].className = 'menu' + idNum + 'over';

		// hide currently visible sub level if there is one
		for(i = (idNum + 1); i <= max; i++){
			if(currentVisibleDiv[i]){
				currentVisibleDiv[i].style.zIndex = '-10';
				currentVisibleDiv[i].style.visibility = 'hidden';
				currentVisibleDiv[i].style.display = 'none';
				currentVisibleDiv[i] = null;
			}
		}

		/*t = thisObj.parentNode.parentNode.parentNode.parentNode.id.replace(/level/i, '');
		i = t.indexOf('_');
		t = t.slice(0,i);
		tmpLevel = parseInt(t);

		if( objLastTR[tmpLevel] ){
			if(objLastTR[tmpLevel]!=thisObj) {
				if(objLastTR[tmpLevel].style.color!=mnuBGColor) {
					lstTmp = objLastTR[tmpLevel].parentNode.getElementsByTagName("td");
					lstTmp[0].style.backgroundColor = '';
					lstTmp[2].style.color = mnuBGColor;
					lstTmp[2].style.backgroundColor = '';
					objLastTR[tmpLevel].style.backgroundColor = '';
					objLastTR[tmpLevel].style.color = mnuBGColor;
					lstTmp = objLastTR[tmpLevel].getElementsByTagName("A");
					lstTmp[0].style.color = mnuBGColor;
				}
			}
		}
*/
		if(divChild){
			// -- highlight the menu item --
			/*lstTmp = thisObj.parentNode.getElementsByTagName("td");
			lstTmp[2].style.color = '#ffffff';
			lstTmp[0].style.backgroundColor = mnuBGColor;
			lstTmp[2].style.backgroundColor = mnuBGColor;
			lstTmp = thisObj.getElementsByTagName("A");
			lstTmp[0].style.color = '#ffffff';

			thisObj.style.color = '#ffffff';
			thisObj.style.backgroundColor = mnuBGColor;

			objLastTR[tmpLevel] = thisObj;*/
			// -------------

			// show sub menu

			divTmp = thisObj.parentNode.parentNode.parentNode.parentNode;
			if( !document.all ) {
				posTop = thisObj.parentNode.offsetTop; // netscape 6 needs to be like this
				posTop += 146;
			}
			else {
				posTop = divTmp.offsetTop + thisObj.parentNode.offsetTop ; // netscape 6.1 needs to be like this
			}
			
			if( this.isMac) {	
				//alert("is a Mac");
				posTop += 70;
			}

			lstTmp = thisObj.parentNode.getElementsByTagName("td");
			posLeft = divTmp.offsetLeft + divTmp.offsetWidth;
			document.getElementById(divChild).style.visibility = 'visible';
			document.getElementById(divChild).style.display = '';
			//document.getElementById(divChild).style.backgroundColor = thisObj.parentElement.parentElement.parentElement.parentElement.style.backgroundColor;

			//put back into code
			//if( (posLeft + document.getElementById(divChild).offsetWidth) > screen.width )
			//	posLeft = screen.width - (document.getElementById(divChild).offsetWidth + 10);
			//end

			if( CascadeLeft ){
			//if( (posLeft + document.getElementById(divChild).offsetWidth) > screen.width ) {
				posLeft = divTmp.offsetLeft - document.getElementById(divChild).offsetWidth;
			}

			if(document.all) {
				posTop -= 1;
			}
			posLeft -= 1;

			document.getElementById(divChild).style.left = posLeft;
			document.getElementById(divChild).style.top = posTop;
			document.getElementById(divChild).style.zIndex = '40';

			currentVisibleDiv[idNum + 1] = document.getElementById(divChild);
		}

	} else if(document.all){ // ie 4
		// thisObj.parentElement.children[0].style.backgroundColor = '#6F80A0';
		// thisObj.parentElement.children[1].style.backgroundColor = '#6F80A0';
		// thisObj.parentElement.children[2].style.backgroundColor = '#6F80A0';

		idTmp = thisObj.parentElement.parentElement.parentElement.parentElement.id;
		idTmp = idTmp.replace('level', '');
		idNum = parseInt(idTmp);
		for(i = (idNum + 1); i <= max; i++){
			if(currentVisibleDiv[i]){
				currentVisibleDiv[i].style.zIndex = '-10';
				currentVisibleDiv[i].style.visibility = 'hidden';
				currentVisibleDiv[i].style.display = 'none';
				currentVisibleDiv[i] = null;
			}
		}
		divTmp = thisObj.parentElement.parentElement.parentElement.parentElement;
		posLeft = divTmp.offsetLeft+thisObj.parentElement.parentElement.parentElement.offsetWidth;
		posTop = divTmp.offsetTop+thisObj.parentElement.offsetTop;

		if(divChild){
			document.all(divChild).style.visibility = 'visible';
			document.all(divChild).style.zIndex = '40';
			document.all(divChild).style.display = '';
			document.all(divChild).style.top = posTop;
			document.all(divChild).style.left = posLeft;
			document.all(divChild).style.backgroundColor = thisObj.parentElement.parentElement.parentElement.parentElement.style.backgroundColor;
			currentVisibleDiv[idNum + 1] = document.all(divChild);
		}

	}
}

function showSuggested(thisObj){
	var divSuggested = document.getElementById("level2_13");
	var posLeft = 100;
	var posTop = 100;
	
	for(var i = (3); i <= max; i++){
		if(currentVisibleDiv[i]){
			currentVisibleDiv[i].style.zIndex = '-10';
			currentVisibleDiv[i].style.visibility = 'hidden';
			currentVisibleDiv[i].style.display = 'none';
			currentVisibleDiv[i] = null;
		}
	}
	divSuggested.style.visibility = 'visible';
	divSuggested.style.display = '';
	
	divParent = thisObj.parentNode.parentNode.parentNode.parentNode;
	posLeft = divParent.offsetLeft - divSuggested.offsetWidth;
	posTop = divParent.offsetTop + thisObj.parentNode.offsetTop-1; 
	
	divSuggested.style.left = posLeft;
	divSuggested.style.top = posTop;
	divSuggested.style.zIndex = '40';
	
	
	
	currentVisibleDiv[3] = divSuggested;
}
function showRegions(thisObj){

	var divRegions = document.getElementById("DivRegions");
	var posLeft = 100;
	var posTop = 100;
	
	
	for(var i = (3); i <= max; i++){
		if(currentVisibleDiv[i]){
			currentVisibleDiv[i].style.zIndex = '-10';
			currentVisibleDiv[i].style.visibility = 'hidden';
			currentVisibleDiv[i].style.display = 'none';
			currentVisibleDiv[i] = null;
		}
	}
	
	divRegions.style.visibility = 'visible';
	divRegions.style.display = '';
	

	divParent = thisObj.parentNode.parentNode.parentNode.parentNode;
	posLeft = (divParent.offsetLeft - divRegions.offsetWidth);
	posTop = divParent.offsetTop + thisObj.parentNode.offsetTop-1; 
	
	divRegions.style.left = posLeft;
	divRegions.style.top = posTop;
	divRegions.style.zIndex = '40';
	
	
	
	currentVisibleDiv[3] = divRegions;
}
function showInterests(thisObj){

	var divInterests = document.getElementById("DivInterests");
	var posLeft = 100;
	var posTop = 100;
	
	
	for(var i = (3); i <= max; i++){
		if(currentVisibleDiv[i]){
			currentVisibleDiv[i].style.zIndex = '-10';
			currentVisibleDiv[i].style.visibility = 'hidden';
			currentVisibleDiv[i].style.display = 'none';
			currentVisibleDiv[i] = null;
		}
	}
	
	divInterests.style.visibility = 'visible';
	divInterests.style.display = '';
	

	divParent = thisObj.parentNode.parentNode.parentNode.parentNode;
	posLeft = (divParent.offsetLeft - divInterests.offsetWidth);
	posTop = divParent.offsetTop + thisObj.parentNode.offsetTop-1; 
	
	divInterests.style.left = posLeft;
	divInterests.style.top = posTop;
	divInterests.style.zIndex = '40';
	
	
	
	currentVisibleDiv[3] = divInterests;
}
function showSuggestions(thisObj){

	var divSuggestions = document.getElementById("DivSuggestions");
	var posLeft = 100;
	var posTop = 100;
	
	
	for(var i = (3); i <= max; i++){
		if(currentVisibleDiv[i]){
			currentVisibleDiv[i].style.zIndex = '-10';
			currentVisibleDiv[i].style.visibility = 'hidden';
			currentVisibleDiv[i].style.display = 'none';
			currentVisibleDiv[i] = null;
		}
	}
	
	divSuggestions.style.visibility = 'visible';
	divSuggestions.style.display = '';
	

	divParent = thisObj.parentNode.parentNode.parentNode.parentNode;
	posLeft = (divParent.offsetLeft - divSuggestions.offsetWidth);
	posTop = divParent.offsetTop + thisObj.parentNode.offsetTop-1; 
	
	divSuggestions.style.left = posLeft;
	divSuggestions.style.top = posTop;
	divSuggestions.style.zIndex = '40';
	
	
	
	currentVisibleDiv[3] = divSuggestions;
}


function tdMouseOut(thisObj, divChild, flgCloseMenu, flgHeadingMenu, tmpLevel){
	var x = 0;
	var idTmp;
	var idNum;
	var lstTmp;

	if( document.getElementById ){
		if( flgCloseMenu ){
			thisObj.className = 'MenuCloseOut';
			thisObj.firstChild.className = 'menucloseoutA';
		}
		else if( flgHeadingMenu ){
			thisObj.className = 'MenuHeadingOut';
			thisObj.firstChild.className = 'MenuHeadingOutA';
		}
		else{
			// thisObj.firstChild.style.color = 'black';
			if(tmpLevel) {
				idNum = tmpLevel;
			}
			else {
				idTmp = thisObj.parentNode.parentNode.parentNode.parentNode.id;
				idTmp = idTmp.replace('level', '');
				idNum = parseInt(idTmp);
			}

			thisObj.className = 'menu' + idNum + 'out';
			thisObj.firstChild.className = 'menu' + idNum + 'out';

			lstTmp = thisObj.parentNode.getElementsByTagName("td");
			lstTmp[0].className = 'menu' + idNum + 'out';
			lstTmp[1].className = 'menu' + idNum + 'out';
			lstTmp[2].className = 'menu' + idNum + 'out';

			//lstTmp[1].firstChild.className = 'menu' + idNum + 'out';
		}
	}
	else if( document.all ){
		// thisObj.parentElement.children[0].style.backgroundColor = '#6F80A0';
		// thisObj.parentElement.children[1].style.backgroundColor = '#6F80A0';
		// thisObj.parentElement.children[2].style.backgroundColor = '#6F80A0';
		for(x = 0; x < thisObj.children.length; x++){
			thisObj.children[x].style.color = 'white';
		}
	}
}

function tdOnClick(objThis){
	var tmp;

	if(isW3C){
		document.location.href = objThis.firstChild.href;
	}else if(isIE){
		if(objThis.children.length > 0 && (tmp = objThis.children[0].href))
			top.document.location.href = tmp;
	}
}

function stubFunc(){

}

function animateMenu(divRef, topPos){

	var lastPos = (0 - divRef.offsetHeight) + 10;

	divRef.style.top = lastPos;

	while( divRef.offsetTop < topPos ){
		setTimeout('stubFunc()', 100)

		lastPos++;
		divRef.style.top = lastPos;

	}


}

function showMnuLevel(tmpLevel, objThis, parentID, divName, home, is2ndMenu){
	var tmpTop;
	var tmp;
	var tmpObj;
	var obj;
	var leftPos;
	var rightPos;
	var p;

	if(!document.getElementById) isW3C=false;

	if(loaded){
		hideAllMenus();
		mnuactive = false;

		var menu;
		menu = getItem('level' + tmpLevel + '_' + parentID);

		if( MenusAtTop )
		{			
			leftPos = getEltPageLeft(objThis) + MenusLeftOffset + 85;			
			topPos = getEltPageTop(objThis) + getEltHeight(objThis) + MenusTopOffset - 30;
			
		}
		else
		{
			topPos = getEltPageTop(objThis) + MenusTopOffset;
			// leftPos = getEltPageLeft(objThis) + getEltWidth(objThis) + MenusLeftOffset;
			leftPos = getEltPageLeft(objThis) + MenusLeftOffset +160;
			
		}

		/*lstTmp = objThis.getElementsByTagName("A");
		lstTmp[0].style.color = '#000000';
		objThis.style.color = '#000000';

		objLastTR[1] = objThis;
		*/
		var lstElems = document.getElementsByTagName('body');

		if(tmpLevel <= max && !dontShow[tmpLevel])
		{
			if(parentID != -1)
			{
				if(divName){
					currentVisibleDiv[tmpLevel] = getItem(divName);
				}
				else{
					currentVisibleDiv[tmpLevel] = getItem('level' + tmpLevel + '_' + parentID);
				}
				currentVisibleDiv[tmpLevel].style.display="";

				if( MenusAtTop )
				{
					/*
					//menus at top of page
					if( objThis.tagName.toLowerCase() == 'img' )
					{
						leftPos = objThis.parentNode.parentNode.offsetLeft;
						p = objThis.parentNode;
						var i = 0;

						for(i = 0; i < 5; i++ )
						{
							leftPos += p.offsetLeft;
							p = p.parentNode;
						}

						leftPos += MenuLeftOffset;
					}

					if( document.getElementById('MainTable') )
						leftPos += document.getElementById('MainTable').offsetLeft;

					//if( bv.isNN ) leftPos -= 35;
					if( bv.isNN ) leftPos -= 95

					

					*/
					var tooWide = document.body.offsetWidth - currentVisibleDiv[tmpLevel].offsetWidth;
					tooWide -= 20;
					if( leftPos > tooWide ) leftPos = tooWide;

				}
				else
				{
					leftPos -= currentVisibleDiv[tmpLevel].offsetWidth;
					
					
					//menus down left of page
				}

				currentVisibleDiv[tmpLevel].style.left = leftPos;
				currentVisibleDiv[tmpLevel].style.visibility = 'visible';
				currentVisibleDiv[tmpLevel].style.zIndex = 40;
				currentVisibleDiv[tmpLevel].style.top = topPos;
				currentVisibleDiv[tmpLevel].style.backgroundColor = objThis.style.backgroundColor;
			}
			else
			{
				document.getElementById('level' + tmpLevel + '_' + parentID).style.left = leftPos ;
				document.getElementById('level' + tmpLevel + '_' + parentID).style.visibility = 'visible';
				document.getElementById('level' + tmpLevel + '_' + parentID).style.zIndex = 40;
				document.getElementById('level' + tmpLevel + '_' + parentID).style.top = topPos;
				document.getElementById('level' + tmpLevel + '_' + parentID).style.backgroundColor = objThis.style.backgroundColor;
			}
		}
	}
}







function swapDivImg(strNewImg, idTmp){
		if( idTmp == 18 ) // solutions
			alert('strNewImg: ' + strNewImg + ', id: ' + idTmp);
}

function hideAllMenus(){
	var lstTmp;

	for(i = 1; i <= max; hideMnuLevel(i), i++);
	mnuactive = false;
	
}

function hideMnuLevel(tmpLevel){
//	var strCmd = '';

	if(max >= tmpLevel && loaded){
		if( currentVisibleDiv[tmpLevel] )
		{
			currentVisibleDiv[tmpLevel].style.zIndex = '-10';
			hideElt(currentVisibleDiv[tmpLevel]);
			//currentVisibleDiv[tmpLevel].style.display= 'none';
			currentVisibleDiv[tmpLevel] = null;
		}
	}
}

function hideMenu(level){
	for(var i = level; i <= max; hideMnuLevel(i), i++);
}

var infowindow

function bigpiclink(picID, w, h, newWin){
	if( newWin )
		ShowPopUpWindow("BigPic","bigpic.cfm?pic_id="+picID,w,h,"no","no","yes");
	else
		document.location.href = 'popup_pic.cfm?pic_id=' + picID;
}

function ShowPopUpWindow(Name, File, w, h, Status, Resize, Scroll){
	var t=0, l = 0, winstring = "";

	if(infowindow){
		if(!infowindow.closed) infowindow.close()
	}

	l = ((screen.width / 2) - (w / 2))
	t = ((screen.height / 2) - (h / 2))

	winstring = "width=" + w + ", height=" + h + ",left=" + l + ",top=" + t +  ",status=" + Status + ",resizable=" + Resize + ",scrollbars=" + Scroll;

	infowindow = window.open(basehref + File,Name,winstring);
}
function OpenInPopUpWindow(name, file, w, h, Status, Resize, Scroll)
{
	var t = 0, l = 0, winstring = "";
	
	l = ((screen.width / 2) - (w / 2))
	t = ((screen.height / 2) - (h / 2))

	winstring = "width=" + w + ", height=" + h + ",left=" + l + ",top=" + t +  ",status=" + Status + ",resizable=" + Resize + ",scrollbars=" + Scroll;

	infowindow = window.open(file, name, winstring);
}
function ShowPopUp(url, w, h) 
{
	OpenInPopUpWindow("", url, w, h, "yes", "no", "yes");
}

function ShowBigPic(f,w,h) {
	ShowPopUpWindow("BigPic","bigpic.cfm?bigpic="+f,w,h,"no","no","yes");
}

function ShowBigPic2(f,w,h) {
//	f = f.replace(/=/, '-');

	ShowPopUpWindow("BigPic",baseHref + "bigpic.cfm/bigpic/"+f,w,h,"no","no","yes");
}

function OpenInPopup(url)
{
	ShowPopUpWindow("prpopup",url,650,600,"yes","yes","yes");
}

function TicketFramePopup(url)
{
	ShowPopUpWindow("ticketpopup",url,756,450,"yes","yes","yes");
}

function OpenInParent(url)
{
	window.opener.location.href=basehref + url;
	window.close();
}

function NoneLink() {
	return
}

function AddToShortList(id)
{
	ShowPopUpWindow("slpopup","AddToShortlist.cfm?prop=" + id,300,162,"yes","yes","yes");
}

function RemoveFromShortList(id)
{
	ShowPopUpWindow("slpopup","RemoveFromShortlist.cfm?prop=" + id,300,162,"yes","yes","yes");
	document.location.href = document.location.href;
}

function OpenPicture(id)
{
	ShowPopUpWindow("slpopup","viewPicture.cfm?id=" + id,550,550,"yes","yes","yes");
}

function CallBack()
{
	ShowPopUpWindow("slpopup","Callback.cfm",400,450,"yes","yes","yes");
}

function OpenShortlist()
{
	document.location.href= basehref + 'default.cfm/loadfile.search_results.cfm/showbasket.true';
}

function Newsletter()
{
	document.location.href= basehref + 'default.cfm/loadfile.subscribe.cfm';
}

function LevOneOver(objThis,tmpClass) {
	var lstTmp;
	
	objThis.className = tmpClass + 'on';
	
	lstTmp = objThis.getElementsByTagName('a');
	lstTmp[0].className = tmpClass + 'on';
}

function LevOneOut(objThis,tmpClass) {
	var lstTmp;
	
	objThis.className = tmpClass;
	
	lstTmp = objThis.getElementsByTagName('a');
	lstTmp[0].className = tmpClass;
}