// JavaScript Document
$(document).ready(function(){
	//$('.mapshow,.locMap').click(function(){
	//	popupImage($(this).attr('value'));	
	//});				
	var hash=location.hash;
	if(hash!=''){
	  hash=hash.replace("#","");
	  hash='#'+hash;
	  try { $(hash).scrollIntoView();}
	  catch(e){};
	}
	
	$('#pint').click(function(){
	/*	mstr = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" type="text/css" href="/css/css.css"><script language="javascript" type="text/javascript" src="/js/jquery.js"></script><script language="javascript" type="text/javascript" src="/js/init.js"></script><title>'+$('#nTitle').text()+'</title></head><body>';
		mstr += '<div id="pw"><div id="pw_t">'+$('#nTitle').text()+'</div>';
		mstr += '<div id="pw_h">'+$('#ndt').text()+'</div>';
		mstr += '<div id="pw_c">'+$(this).parent().next().html()+'</div>';
		mstr += '<div id="pw_o"><A HREF="javascript:window.close()">Close</A> | <A HREF="#" onclick="qq()">Print</A> </div></div></body></html><script language="javascript" type="text/javascript" >$(document).ready(function(){alert("A");})</script>';
		msg=window.open("","","top=0,left=0,width="+660+",height="+($('#content').height()-30)+",scrollbars=yes,resizable=yes");
			msg.document.write(mstr);
			
			//innerHTML
			mstr = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>asdasd</title></head><body>';
		mstr += '<a href="javascript:window.print();">Print</a></body></html>';
		msg=window.open("","","top=0,left=0,width=660,height=700,scrollbars=yes,resizable=yes");
			msg.document.write(mstr);*/
	});
 
});
function qq(){
	
	window.print();
	}

function popupImage(img,a,b){
	/*	mstr = "<HTML><HEAD></HEAD><BODY><CENTER><TABLE>";
		mstr+= "<TR><TD ALIGN=CENTER><A CLASS=redlnk HREF='javascript:window.close()' style='color:#858585; text-decoration:none;font-size:11px;'>Close</A> <span style='color:#858585; text-decoration:none;font-size:11px;'> | </span> <A HREF='javascript:print()' style='color:#858585; text-decoration:none;font-size:11px;'>Print</A></TD></TR>";
		mstr+= "<TR><TD ALIGN=CENTER HEIGHT=10>&nbsp;</TD></TR>";
		mstr+= "<TR><TD ALIGN=CENTER><IMG SRC='"+img+"' BORDER=0 ></TD></TR>";
		mstr+= "</TABLE></CENTER></BODY></HTML>";
                if ((navigator.appName=="Netscape")&& (parseInt(navigator.appVersion)<=4)) {
                        winwidth = screen.availWidth;
                        winheight = screen.availHeight
//                        msg=window.open("","","top=0,left=0,width="+winwidth+",height="+winheight+",scrollbars=yes,resizable=yes");
                }else{
//                        msg=window.open("","","fullscreen=yes");
                }
		
		
		if(a>0 && b>0){
			msg=window.open("","","top=0,left=0,width="+(a+60)+",height="+(b+80)+",scrollbars=yes,resizable=yes");
			msg.document.write(mstr);
		}
		
*/
	}
	
	
	function View2(winname,theURL,top,left)
{
		width=60;
		height=40;
        msgWindow = window.open(theURL,winname,'menubar=no,scrollbars=yes,toolbar=no,location=no,titlebar=no,resizable=no,status=no,screenX=0,top='+top+',screenY=0,left='+left+',width='+width+',height='+height+'');

        if (msgWindow.opener == null)
                msgWindow.opener = self;

}


	function View3(winname,theURL)
{
		top=30;
		left=30;
		width=60;
		height=40;
        msgWindow = window.open(theURL,winname,'menubar=no,scrollbars=yes,toolbar=no,location=no,titlebar=no,resizable=no,status=no,screenX=0,top='+top+',screenY=0,left='+left+',width='+width+',height='+height+'');

        if (msgWindow.opener == null)
                msgWindow.opener = self;

}

