	// show addthis on click, not on rollover
	var addthis_config = { ui_click:false, ui_delay:500 };
	
	var popUpWin = null;
	
	function setPopUpWindow(URLStr, left, top, width, height) {
		if(popUpWin) {
			if(!popUpWin.closed) popUpWin.close();
		}
		popUpWin = window.open(URLStr, "popUpWin", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=no,width="+width+",height="+height+",left="+left+", top="+top+",screenX="+left+",screenY="+top+'');
		
		if(!popUpWin) {
			alert('In order to view this site, you have to allow popups in your browser!');
		}
		popUpWin.focus();
	}
	
	function setPopUpWindowCentered(URLStr, width, height) {
		setPopUpWindow(URLStr, (screen.width - width) / 2, (screen.height * 0.97 - height) / 2, width, height);
	}

	function getFlashMovieObject(movieName) {
		if (window.document[movieName]){
			return window.document[movieName];
		}
		if (navigator.appName.indexOf("Microsoft Internet") == -1){
			if(document.embeds && document.embeds[movieName]) {
				return document.embeds[movieName];
			}
		} else {
			return document.getElementById(movieName);
		}
	}
	
	function showEmail(receipient, domain) {
		document.write(receipient + "@" + domain);
	}

	function showEmailLink(receipient, domain) {
		parent.location = "m" + "a" + "i" + "l" + "t" + "o" + ":" + receipient + "@" + domain;
	}

	$(document).ready(function(){
	
		hideQuicknavi = function() {
			if($('#htmlcontentcontainer').height != 0) {
				if($.browser.win()) {
					$('#htmlcontent .about').hide();
					$('#htmlcontent .contact').hide();
					
				} else {
					$('#htmlcontent .about').fadeOut(250);
					$('#htmlcontent .contact').fadeOut(250);
				}
				
				hideQuicknaviBackground();
			}
		}
		
		hideQuicknaviBackground = function() {
			if($.browser.win()) {
				$('#htmlcontentcontainer').height("0px");
				$('#quicknavibackgroundcontainer').height("26px");
				
			} else {
				if($('#htmlcontentcontainer').height != 0) {
					$('#htmlcontentcontainer').animate({ height: "0px" }, 250, "easeOutQuad");
					$('#quicknavibackgroundcontainer').animate({ height: "26px" }, 250, "easeOutQuad");
				}
			}
		}

		$('#quicknavi #about').click(function() {
			if ($('#htmlcontent .about').is(':hidden')) {
				if($.browser.win()) {
					$('#htmlcontentcontainer').height(quicknavi_height + "px");
					$('#quicknavibackgroundcontainer').height(quicknavi_height + "px");
					$('#htmlcontent .about').show();
					$('#htmlcontent .contact').hide();
					
				} else {
					$('#htmlcontent .about').fadeIn(250);
					$('#htmlcontent .contact').fadeOut(250);
					if($('#htmlcontentcontainer').height != quicknavi_height) {
						$('#htmlcontentcontainer').animate({ height: quicknavi_height + "px" }, 250, "easeOutQuad");
						$('#quicknavibackgroundcontainer').animate({ height: quicknavi_height + "px" }, 250, "easeOutQuad");
					}
					
				}
			} else {
				hideQuicknaviBackground();
				
				if($.browser.win()) {
					$('#htmlcontent .about').hide();
				} else {
					$('#htmlcontent .about').fadeOut(250);
				}
			}
		});
		
		$('#quicknavi #contact').click(function() {
		
			if ($('#htmlcontent .contact').is(':hidden')) {
				if($.browser.win()) {
					$('#htmlcontentcontainer').height(quicknavi_height + "px");
					$('#quicknavibackgroundcontainer').height(quicknavi_height + "px");
					$('#htmlcontent .contact').show();
					$('#htmlcontent .about').hide();
				
				} else {
					$('#htmlcontent .contact').fadeIn(250);
					$('#htmlcontent .about').fadeOut(250);
					if($('#htmlcontentcontainer').height != quicknavi_height) {
						$('#htmlcontentcontainer').animate({ height: quicknavi_height + "px" }, 250, "easeOutQuad");
						$('#quicknavibackgroundcontainer').animate({ height: quicknavi_height + "px" }, 250, "easeOutQuad");
					}
					
				}
				
			} else {
				hideQuicknaviBackground();
				
				if($.browser.win()) {
					$('#htmlcontent .contact').hide();
				} else {
					$('#htmlcontent .contact').fadeOut(250);
				}
			}
		});
		
		$('#htmlcontent .contact .closebutton').click(function() {
			if($.browser.win()) {
				$('#htmlcontent .contact').hide();				
			} else {
				$('#htmlcontent .contact').fadeOut(250);
			}
			hideQuicknaviBackground();
		});
		
		$('#htmlcontent .about .closebutton').click(function() {
			if($.browser.win()) {
				$('#htmlcontent .about').hide();
			} else {
				$('#htmlcontent .about').fadeOut(250);
			}
			hideQuicknaviBackground();
		});
		
	});
