function OpenNewWin(url, win) {
	popupWin = window.open(url, win, 'menubar=1,toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=1,dependent=1,width=720,height=420')
} 
function OpenChildWin(url, win) {
	popupWin = window.open(url, win, 'menubar=1,toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=1,dependent=1,width=740,height=450')
}
function OpenLittleWin(url, win) {
	popupWin = window.open(url, win, 'menubar=1,toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=1,dependent=1,width=320,height=240')
}
function OpenTinyWin(url, win) {
	popupWin = window.open(url, win, 'menubar=1,toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=1,dependent=1,width=320,height=240')
}

	function OpenNewsWindow(NewsID){
		window.open("/popupNews.asp?NewsID=" + NewsID,"NewsWindow","Width=550,Height=500,Scrollbars=1,Resizable=yes")
	}

$(document).ready(function(){
	var winH = $(window).height(),
	objectH = $("#dropin").height();
	if($.browser.safari){ bodyelem = $("body") } else{ bodyelem = $("html") } 
	if($(bodyelem).scrollTop() > 0) {
			$("#dropin").animate({'top': $(bodyelem).scrollTop()+(winH-2*objectH)}, 10000);
			$("#dropin").hover(function() {
					$(this).stop();
				},
				function() {
					$(this).animate({'top': $(bodyelem).scrollTop()+(winH-2*objectH)}, 10000);
				});
			//$("#dropin").animate({'top': $(bodyelem).scrollTop()+(winH-2*objectH)}, 20000);
		} else {
			$("#dropin").animate({'top': winH-2*objectH}, 10000);
			$("#dropin").hover(function() {
					$(this).stop();
				},
				function() {
					$(this).animate({'top': winH-2*objectH}, 10000);
				});
			//$("#dropin").animate({'top': winH-2*objectH}, 20000);
		}
	$("#dismissbox").click(function() {
		$("#dropin").hide();				
	});
});
