         var popup = null;

	function launch_window(url, windowtitle)
	{
		window.open(url);
	}

	 function popup_show(url, page_title, title, desc)
	 {
                if( desc ){
                    cdesc = "[" + desc + "]";
                }else{
                    cdesc = desc;
                }
		// var url = url.replace(/L/g,'%20');
		document.getElementById('rightcontent').innerHTML=
                     "<h1>" + page_title + "</h1>" +
                     "<h2>" + title + "</h2>" +
                     "<div style=\"text-align:center;\">" +
                     "<img src=\"" + url + " \"alt=\"" + desc + "\" class=\"gallery-image\"/>" +
                     "<br />" + cdesc +
                     "<br /><br />" + 
                     "[<a href=\"" + self.location.href + "\">Back</a>]" +
                     "</div>";
	 }

	 function popup_show_tour(url, page_title, title, desc)
	 {
                if( desc ){
                    cdesc = "[" + desc + "]";
                }else{
                    cdesc = desc;
                }
		// var url = url.replace(/L/g,'%20');
		document.getElementById('rightcontent').innerHTML=
                     "<h1>" + page_title + "</h1>" +
                     "<h2>" + title + "</h2>" +
                     "<div style=\"text-align:center;\">" +
                     "<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" width=\"405\" height=\"255\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\">" +
                     "<param name=\"src\" value=\"" + url + "\" />" +
                     "<param name=\"autoplay\" value=\"true\" />" +
                     "<param name=\"controller\" value=\"false\" />" +
                     "<embed width=\"405\" height=\"255\" autoplay=\"true\" controller=\"false\"   name=\"controller\" value=\"false\" src=\"" + url + "\" ></embed>" +
                     "<br />" + cdesc +
                     "<br /><br />" + 
                     "[<a href=\"" + self.location.href + "\">Back</a>]" +
                     "</div>";
	 }

         function popup_showa(url) {
            if (popup!=null && !popup.closed){
	    	popup.document.images[0].src=url;
	    	// popup.close();

	    }else{
               // popup = window.open('', 'popup','width=600,height=440,resizable,scrollbars');
               popup = window.open('', 'popup','resizable,scrollbars');
	       popup.document.open();
	       popup.document.write('<html><head></head><body>');
	       popup.document.write('<img src="' + url + '"  /> <br />' );
	       popup.document.write('<a href="javascript:close(this)">Close</a>');
	       popup.document.write('</body></html>');
	       popup.document.close();
	    }
	    var img = popup.document.images[0];
	    //popup.document.write(img.width);
	    popup.resizeTo(img.width + 40,img.height + 90);
	    // popup.resizeTo(200,200);
            popup.focus();
         }
