var current_album = ''; var current_page = 0; // check to see if javascript is enabled x_checkJavascript('true', checkJavascript_cb); function checkJavascript_cb(result){ //do nothing } // pre-load the first three thumbnails from each album function mouseOver(id){ id.style.opacity = '1.0'; id.style.filter = 'alpha(opacity=100)'; return; } function mouseOut(id){ id.style.opacity = '0.60'; id.style.filter = 'alpha(opacity=60)'; return; } function flipVisibility(id){ visibility = id.style.visibility; id.style.visibility = (!visibility || visibility == 'visible') ? 'hidden' : 'visible'; return; } function showPage(){ pageid = document.getElementById('overlay'); tableid = document.getElementById('pic_tbl'); pageid.style.visibility = 'visible'; tableid.style.visibility = 'hidden'; } function hidePage(){ pageid = document.getElementById('overlay'); tableid = document.getElementById('pic_tbl'); pageid.style.visibility = 'hidden'; tableid.style.visibility = 'visible'; } var newwindow; function openNewWindow(url){ newwindow=window.open(url,'full'); if (window.focus) {newwindow.focus()} } function loadAlbum(name,page){ hidePage(); current_album = name; current_page = parseInt(page); x_returnAlbumTitle(name, '#current_viewing'); x_getNumPages(name,getNumPages_cb); for (i= 1; i <= 9; i++) { img_str = '#img' + i; x_returnImageHtml(i,page,current_album,'small',img_str); } } function loadExtra(name){ fillSpan('current_viewing',' '); fillSpan('pageList',' '); page_str = '#overlay'; x_returnExtraText(name,page_str); showPage(); } function loadZoomImage(page,image_num){ //clear zoom layer fillSpan('zimg',' '); fillSpan('zimg_desc',' '); fillSpan('zimg_title',' '); //fill zoom layer zimg_str = '#zimg'; zimg_desc_str = zimg_str + '_desc'; zimg_title_str = zimg_str + '_title'; x_returnImageHtml(image_num,page,current_album,'large',zimg_str); x_returnImageDescription(image_num,page,current_album,zimg_desc_str); x_returnImageTitle(image_num,page,current_album,zimg_title_str); //show zoom layer document.getElementById('zoom').style.visibility='visible'; } function getNumPages_cb(result){ //num_pages = result; //fillSpan('totalPages',result); html_out = ""; num_pages = parseInt(result); for(i=1; i<=num_pages; i++){ if(i == current_page){ html_out = html_out + "" + i + ""; } else{ html_out = html_out + "" + i + ""; } } fillSpan('pageList',html_out); } function unLoadPage(){ x_stopSession(stopSession_cb) } function stopSession_cb(result){ //do nothing } function fillSpan(spanid,filltxt){ if(document.all) { x = document.all[spanid]; x.innerHTML = filltxt; } else { // from here: http://www.javascriptkit.com/javatutors/dynamiccontent4.shtml rng = document.createRange(); el = document.getElementById(spanid); rng.setStartBefore(el); htmlFrag = rng.createContextualFragment(filltxt); while (el.hasChildNodes()) el.removeChild(el.lastChild); el.appendChild(htmlFrag); } } function getSpan(spanid){ if (document.getElementById) { x = document.getElementById(spanid); return x.innerHTML; } else { x = document.all[spanid]; return x.innerHTML; } }