	var winW = 820, winH = 600, winW2 = 820, winH2 = 500, winHZ=999999, flashSWF ;
	
	function paper_flashSize(){
		if(winHZ>400){
			 fboH=parseInt(500*winW/820);
			 if(fboH>winH){
				fboW=parseInt(820*winH/500);
				if(fboW<winW)
					winW=fboW;
			 }
			 else{
				 winH=fboH;
			 }
		 }
		 else{
			 fboH=parseInt(600*winW/820);
			 if(fboH>winH){
				fboW=parseInt(820*winH/600);
				if(fboW<winW)
					winW=fboW;
			 }
			 else{
				 winH=fboH;
			 }
		 }
	}
	
	function winodowsize(){		
		if (parseInt(navigator.appVersion)>3) 
		{
			 if (navigator.appName=="Netscape") 
			 {
				  winW = window.innerWidth;					 
				  winH = window.innerHeight;
			 }
			else
			 if (navigator.appName.indexOf("Microsoft")!=-1 ) 
			 {
				  winW = document.body.offsetWidth;					  
				  winH = document.body.offsetHeight;
			 }
			else
			 if(window.XMLHttpRequest)
			 {
				if(document.body.offsetHeight)
				 winH = document.body.offsetHeight;
				if(window.innerWidth)
				 winW = window.innerWidth;
			 }
			
			 winW2 = winW; 
			 winH2 = winH;
			
			  if(winHZ!=999999){
				 
				  winHZFunc=winW-winH;	
				  if(winHZFunc<401 && winHZ>400 || winHZFunc>400 && winHZ<401){
					    winHZ=winW-winH;
					  	paper_flashSize();
						if(document.getElementById('loading_paperFlash'))
							document.getElementById('loading_paperFlash').style.display='block';
						
		
						if(winHZ>400){
							
							swfname2=vsubpath+'/isnpdc/np/reader500NEW.swf'+flashSWF;	
						}
						else{
							swfname2=vsubpath+'/isnpdc/np/readerNEW.swf'+flashSWF;
						}
												
					    var so2 = new SWFObject(swfname2, "sotester2",winW+"px", "650px", "8","#FFFFFF");
					    so2.addParam("quality", "high");
						so2.addParam("allowFullScreen","true");												
						so2.addParam("allowscriptaccess", "always");	
						
						swfWresult=so2.write("flashcontent2");
						
						if(document.getElementById('flashcontent2'))
							document.getElementById('flashcontent2').style.visibility='hidden';
				  }
				  	//window.location.href=window.location.href;
			  }
			  else{
				 if(winHZ==999999)
				 winHZ=winW-winH;
				 
				 paper_flashSize();
			  }
			 if(document.getElementById('sotester2')){
				document.getElementById('sotester2').setAttribute("width",winW);
				document.getElementById('sotester2').setAttribute("height",winH);
			 }
		}
	}
	
	function readerstart(){
		
		if(document.getElementById('loading_paperFlash')){
			document.getElementById('loading_paperFlash').style.display='none';
		}
		if(document.getElementById('flashcontent2')){
			document.getElementById('flashcontent2').style.visibility='visible';
		}
	}
	
	function readerclose(){
		window.close();
	}
