//<![CDATA[
/****************************************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
*************************************************************** */
/* Modified to support Opera */
function bookmarksite(title,url){
    if (window.sidebar) // firefox
	    window.sidebar.addPanel(title, url, "");
    else if(window.opera && window.print){ // opera
	    var elem = document.createElement('a');
    	elem.setAttribute('href',url);
    	elem.setAttribute('title',title);
    	elem.setAttribute('rel','sidebar');
    	elem.click();
    } else if(document.all)// ie
	    window.external.AddFavorite(url, title);
}
/* getWindowHeight()
*************************************************************** */
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
/* setFooter()
*************************************************************** */
function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('container').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				document.getElementById('container').style.height = (windowHeight - footerHeight) + 'px';
			} else {
				document.getElementById('container').style.height = 'auto';
			}
		}
	}
}
/* setIntro()
*************************************************************** */
function setIntro(){
    var windowHeight = getWindowHeight();
    if ((windowHeight - 484) > 0){
        document.body.style.marginTop = parseInt((windowHeight - 484)/2) + "px";
    }
}
/* switchThumb(id - thumb_med_id [String], n - number of thumbs [Integer])
*************************************************************** */
function switchThumb(id, n) {
    for (var i=0; i<n; i++) {
        var current_id = 'thumb_med' + i;
        var obj = document.getElementById(current_id);
        if (current_id == id)
        	obj.style.display = 'block';
        else
        	obj.style.display = 'none';
    }
}
/* NewWindow(mypage - windowURL [String], name - windowName [String], w - windowWidth [Integer], h - windowHeight [Integer], scroll - windowScroll [String])
*************************************************************** */
function NewWindow(mypage, myname, w, h, scroll){
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;
    var settings ='height='+h+',';
    settings +='width='+w+',';
    settings +='top='+wint+',';
    settings +='left='+winl+',';
    settings +='scrollbars='+scroll+',';
    settings +='resizable=no';
    win=window.open(mypage,myname,settings);
    if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
//]]>