// JavaScript Document var bAllowCaching = false var iHeight var iMinDescPanel = 31 var iMaxDescPanel = 180 var iGroupKey = 0 var sGroupTitle = "" var sSection = "" var sNavLeftBottomIcon = "" var bAllowRightClick = true var bLoggedIn = false bPreloadImg = false bResized = false image1 = new Image() image1.src = "images/icon_maximise.gif" bPreloadImg = true bStartFade = true iContentLeftDivHeight = 0 bStart = true //Add Event Listner function addListener(element, type, expression, bubbling){ bubbling = bubbling || false; if(window.addEventListener) {// Standard element.addEventListener(type, expression, bubbling); return true; } else if(window.attachEvent) {// IE element.attachEvent('on' + type, expression); return true; } else return false; } //addListener(window,'load',contentHeight) //addListener(window,'resize',resizePage) function setHr(){ oZoomImg = new Image() oZoomImg.src = document.getElementById('ZoomImg').src oZoomImg.onload = function(){ document.getElementById('cartHr').style.visibility = 'visible' document.getElementById('cartHr').style.width = document.getElementById('ZoomImg').width+'px' } } function contentHeight() { var myWidth = 0, myHeight = 0, contentHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } contentHeight = myHeight - 34 document.getElementById('contentCell').style.height = contentHeight+"px" document.getElementById('contentTable').style.height = contentHeight+"px" iContentLeftDivHeight = contentHeight if(bStart){ document.getElementById('contentLeftDiv').style.height = iContentLeftDivHeight-110+"px" }else{ document.getElementById('contentLeftDiv').style.height = iContentLeftDivHeight+"px" } bStart = false startFade() } function resizePage(){ bStartFade = false contentHeight() } function startFade(){ if(bStartFade){ var t=setTimeout('timedFade()',1000) } } var iTimer = 1 function timedFade(){ var t=setTimeout("setAlpha('navLeftTop','contentLeftDiv','navLeftBottom')") iTimer++ } function setAlpha(sDivId1,sDivId2,sDivId3){ iAlpha = 10*iTimer //document.getElementById(sDivId1).style.filter = "alpha(opacity="+iAlpha/2+")" document.getElementById(sDivId2).style.filter = "alpha(opacity="+iAlpha+")" document.getElementById(sDivId3).style.filter = "alpha(opacity="+iAlpha+")" if(iTimer<11){ timedFade() }else{ minimise('navLeftBottom') } } function highLight(id,iAlpha){ if(iTimer>1||bResized == true) document.getElementById(id).style.filter = "alpha(opacity="+iAlpha+")" } function minimise(sDivId1){ sMinMax = '' //document.getElementById('navLeftBottomIcon').innerHTML = sNavLeftBottomIcon document.getElementById('MinMax').innerHTML = sMinMax iTimer = 1 t = setTimeout("setHeight('navLeftBottom','-')",10) document.getElementById('navLeftBottomContent').style.display = "none" highLight('navLeftBottom',50) bResized = true return true } function maximise(sDivId1){ sMinMax = '' //document.getElementById('navLeftBottomIcon').innerHTML = sNavLeftBottomIcon document.getElementById('MinMax').innerHTML = sMinMax t = setTimeout("setHeight('navLeftBottom','+')",10) if(iHeight>(iMaxDescPanel-((iMaxDescPanel/2)/2))){ document.getElementById('navLeftBottomContent').style.display = "inline" highLight('navLeftBottom',80) } bResized = true return true } function setHeight(sDivId1,sDirection){ iHeight = document.getElementById(sDivId1).style.height.split("px") if(sDirection=="-"){ iHeight = parseInt(iHeight[0]) - 10 }else{ iHeight = parseInt(iHeight[0]) + 10 } //alert(iHeight) document.getElementById(sDivId1).style.height = iHeight+"px" document.getElementById('contentLeftDiv').style.height = iContentLeftDivHeight-iHeight+"px" if(sDirection=="-"){ if(iHeight>iMinDescPanel) minimise(sDivId1) }else{ if(iHeight31) minimise('navLeftBottom') }*/ } function getThemeGrid(iKey,sTitle){ location.href="ThemeMstList_ThumbGrid.asp?iThemeKey="+iKey+"&title="+sTitle /*if(showPage('ThemeMstList_ThumbGrid.asp?iThemeKey='+iKey,'contentLeftDiv')){ sSection = "Themes" iGroupKey = iKey sGroupTitle = sTitle //if(minimise('navLeftBottom')) document.getElementById('contentLeftDiv').style.filter = "alpha(opacity=100)" sTitle = sSection+' : '+sTitle document.getElementById('navLeftTop').innerHTML = sTitle document.getElementById('navLeftBottomContent').innerHTML = "" if(iHeight>31) minimise('navLeftBottom') }*/ } function getGalleryGrid(iKey,sTitle){ location.href="GalleryMstList_ThumbGrid.asp?iGalleryKey="+iKey+"&title="+sTitle } function getInfoPage(sPage,sSection,sTitle){ location.href=sPage /* if(showPage(sPage,'contentLeftDiv')){ document.getElementById('contentLeftDiv').style.filter = "alpha(opacity=100)" document.getElementById('navLeftTop').innerHTML = sSection + ' - ' + sTitle document.getElementById('navLeftBottomContent').innerHTML = "" if(iHeight>31) minimise('navLeftBottom') }*/ } function showPage(sPage,sLocation,sSetPanel){ //if(sPage.indexOf('undefined')!=-1) sPage = "highlight.asp" var xmlHttp; try{ // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); xmlHttp.overrideMimeType('text/xml') }catch (e){ // Internet Explorer try{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }catch (e){ try{ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch (e){ alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function(){ //alert(xmlHttp.status) if(xmlHttp.readyState==4){ try{ //Use Below to show outputted HTML document.getElementById(sLocation).innerHTML=xmlHttp.responseText; if(String(sSetPanel)!="undefined"){ setZoomPanels(sSetPanel) if(sSetPanel=='setNavLeftTop'){ sKey = document.getElementById('Key').value sRowId = document.getElementById('RowId').value showPage('STMastZoomDetail.asp?StMast_Key='+sKey+'&RowId='+sRowId,'navLeftBottomContent') } } //if(sPage.indexOf('StMastZoom.asp')!=-1&&bLoggedIn){ setHr()} }catch(err){ document.getElementById(sLocation).innerHTML="Error: " + err.description } } } xmlHttp.open("GET",cacheControl(sPage),true); xmlHttp.send(null); return true } function cacheControl(sPage){ if(bAllowCaching) return sPage var d = new Date() if(sPage.indexOf('?')==-1){ sUTC = "?" }else{ sUTC = "&" } sUTC += "now=" sUTC += String(d.getUTCHours()) sUTC += String(d.getUTCMinutes()) sUTC += String(d.getUTCSeconds()) sUTC += String(d.getUTCMilliseconds()) sPage += sUTC return sPage } function zoomProduct(sRowId){ location.href="StMastZoom.asp?RowId="+sRowId /*if(showPage('StMastZoom.asp?RowId='+sRowId,'contentLeftDiv','setNavLeftTop')){ if(String(document.getElementById('MinMax').innerHTML).indexOf('minimise')==-1) maximise('navLeftBottom') }*/ } function setZoomPanels(sSetPanel){ switch(sSetPanel) { case 'setNavLeftTop': sTitle = "" sTitle += document.getElementById('navLeftTop').innerHTML sTitle += ' - ' sTitle += document.getElementById('Description').value sTitle = ''+sTitle sTitle += '' switch(sSection){ case 'Exhibitions': sTitle += '' sTitle += '' document.getElementById('navLeftTop').innerHTML = sTitle break } } // Disable Right Click // Message for the alert box var message="Sorry, that function is disabled.\n\nContents & Graphics Copyright © Living Myth"; function click(e) { if (document.all) { if (event.button == 2) { alert(message); return false; } } if (document.layers) { if (e.which == 3) { alert(message); return false; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); } if(!bAllowRightClick) document.onmousedown=click; var aMenuId = new Array() aMenuId[0] = "AccountMenu" aMenuId[1] = "NewMenu" aMenuId[2] = "ProductTypeMenu" aMenuId[3] = "ExhibitionMenu" aMenuId[4] = "ThemesMenu" aMenuId[5] = "SearchMenu" aMenuId[6] = "WallMenu" aMenuId[7] = "FrameMenu" function closeOtherMenu(sId){ sTitle = "" sImgId = "" sTitleCell = "" for(i=0;i