$(window).resize(function(){
		popup();
	});

 $(document).ready(function(){
		rightcol();						
                $.updnWatermark.attachAll();
		popup();
	});

 function rightcol(){
	 h = $(".rightcol").height();
	 //alert(h);
	 if(h<5) {
		 $(".content").toggleClass("c_2cols");
		 }	 
	 }

 function popup(){
		if($(".layer").length>0){
			t = ($(window).height()-$(".popup").height())/2;
			w = $(window).width();
			if(w<$(".main").width()) w = $(".main").width();
			$(".popup").css("margin-top",t+"px");
			$(".layer").css("height",$(document).height()+"px");
			$(".layer").css("width",w+"px");

			$(".popup .close a").click(function(){
				$(".layer").css("display","none");
					if($.browser.msie&&$.browser.version==6){
					$(".main select").css("display","block");
					}
				});
		}
	 }

function select_location(id)
{
	//alert(id);
	location=$("#"+id+" option:selected").val();
}
