var windowWidth;
		var windowHeight;
			var ie=document.all
		var ns6=document.getElementById&&!document.all
		function fullScreen()
		{
			
			var hdiff;
			window.resizeTo(screen.width/2,screen.height/2);
			window.moveTo(0,10);
			hdiff=window.screenTop;
			window.moveTo(-6,-hdiff+6);
			window.resizeTo(screen.width+13,screen.height+hdiff+26);
		}
		function fixdimention1()
		{
		
		windowWidth = getWidth();
		windowHeight = getHeight();
		document.getElementById("detail").width=windowWidth;	
		if(screen.width >='1350')
		{
			document.getElementById("txtstandardviewpath").value='thumbnails\\large2\\';
			document.getElementById("txtMagnifiedViewPath").value='thumbnails\\largest2\\';
		}
		else if (screen.width>='1276')
		{
				document.getElementById("txtstandardviewpath").value='thumbnails\\large2\\';
				document.getElementById("txtMagnifiedViewPath").value='thumbnails\\largest\\';
			
		}
		else if (screen.width >='1020')
		{
		
			document.getElementById("txtstandardviewpath").value='thumbnails\\large\\';
			document.getElementById("txtMagnifiedViewPath").value='thumbnails\\largest\\';
				
		}
		else if (screen.width <='810')
		{
		
				document.getElementById("txtstandardviewpath").value='thumbnails\\small\\';
				document.getElementById("txtMagnifiedViewPath").value='thumbnails\\largest\\';

					
		}
		
			
			
	if (windowWidth>='1350')
				{
						
				document.getElementById("detail").height=windowHeight-49;
				document.Form1.ZoomLevelLargest2_M0.checked=true;
				document.Form1.ZoomLevelLargest_M0.checked=false;
			
				}
				else if (windowWidth>='1276')
				{
						
				document.getElementById("detail").height=windowHeight-47;
				
				}
				else if (windowWidth>='1020')
				{
				
					document.getElementById("detail").height=windowHeight-49;
				
				}
				else if (windowWidth<='810')
				{
				
					document.getElementById("detail").height=windowHeight-27;
					
				}
			
			
			fixdimention();
				
			
		}
		function fixdimention()
		{
	
		var scrOfY;
		var scrOfX;
	
		windowWidth = getWidth();
		windowHeight = getHeight();
		
			
				if (windowWidth>='1396')
				{
					
					document.getElementById("top8001").style.display="none";
				    document.getElementById("top8002").style.display="block";
					document.getElementById("top1024").style.display="none";
					document.getElementById("top800").style.display="none";
					document.getElementById("detail").height=windowHeight-49;
				}
				else if (windowWidth>='1276')
				{
				
				  document.getElementById("top8002").style.display="none";
					document.getElementById("top1024").style.display="none";
					document.getElementById("top800").style.display="none";
					document.getElementById("top8001").style.display="block";
					document.getElementById("detail").height=windowHeight-47;
				}
				else if (windowWidth>='1020')
				{
				
					document.getElementById("top8001").style.display="none";
					document.getElementById("top8002").style.display="none";
					document.getElementById("top1024").style.display="block";
					document.getElementById("top800").style.display="none";
					
					document.getElementById("detail").height=windowHeight-39;
				}
				else if (windowWidth<='810')
				{
				
					document.getElementById("top8001").style.display="none";
					document.getElementById("top8002").style.display="none";
					document.getElementById("top1024").style.display="none";
					document.getElementById("top800").style.display="block";
					
					document.getElementById("detail").height=windowHeight-27;
				}
				else
				{
				
				document.getElementById("detail").height=windowHeight-39;
				}
				
	//	alert(windowWidth);
		document.getElementById("searchsrc").height=windowHeight-95;
		document.getElementById("settings2").style.height=windowHeight-95;
		document.getElementById("archive1").style.height=windowHeight-95;
		document.getElementById("helpwindow").style.height=windowHeight-95;
		document.getElementById("sharewindow").style.height=windowHeight-95;
		document.getElementById("share1").style.height=windowHeight-95;
			document.getElementById("help_dialog").style.height=windowHeight-200;
		document.getElementById("detail").width=windowWidth;
		
		if(document.getElementById("searchresult").value != "")
		{
		auf(document.getElementById("searchresult").value);
		}
		if(document.getElementById("mode").value=="")
		document.getElementById("mode").value="2";
		if(document.getElementById("pgno").value=="")
		document.getElementById("pgno").value="1";
		if(document.getElementById("detail").src.indexOf("javapagecontent.html")>=0  )
		{
			document.getElementById("detail").src="javapagecontent.html";
			document.getElementById("settingspreview").src="previewpage.aspx?pgno=" + document.Form1.pgno.value + "&mode=" +document.Form1.mode.value+"&Sresolution="+windowWidth+"&Standardview=" + document.getElementById("txtstandardviewpath").value+"&Magnifiedview=" + document.getElementById("txtMagnifiedViewPath").value;
		}
		else if(document.getElementById("detail").src.indexOf("fullimage1.aspx")>=0 || document.getElementById("detail").src=="" )
		{

			document.getElementById("detail").src="fullimage1.aspx?pgno=" + document.Form1.pgno.value + "&mode=" +document.Form1.mode.value+"&Sresolution="+windowWidth+"&clintheight=" + windowHeight+ '&clintwidth=' +windowWidth + '&fitparam=' + document.getElementById("fitheight").value ;
		
				document.getElementById("settingspreview").src="previewpage.aspx?pgno=" + document.Form1.pgno.value + "&mode=" +document.Form1.mode.value+"&Sresolution=" + windowWidth+"&Standardview=" + document.getElementById("txtstandardviewpath").value+"&Magnifiedview=" + document.getElementById("txtMagnifiedViewPath").value+"&clintheight=" + windowHeight+ '&clintwidth=' +windowWidth + '&fitparam=' + document.getElementById("fitheight").value ;

		}

    
    
 }
		 
	function changediv()
	{
	createCookie("searchstring",document.Form1.search1.value);
	createCookie("per_page1",document.Form1.per_page.value);
	createCookie("doc_id1","1");
	var search_typevalue;
 
	for (i = 0; i < document.Form1.Radio1.length; i++) 
	{
	if (document.Form1.search_type[i].checked)
	search_typevalue = document.Form1.search_type[i].value;
	}
	createCookie("search_type12",search_typevalue);
	document.Form1.action="pages.aspx?divval=find_dialog";
	document.Form1.submit();
	if(document.Form1.divtagsvisibility.value=="find_dialog")
		document.getElementById("find_dialog").style.visibility="visible";
	}
	
	
	
		/*for drag & drop of div tag*/
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")

function movepic(img_name,img_src) 
{

document.getElementById(img_name).src=img_src;

}

document.onkeydown=function()
{	
	if(122==event.keyCode)
	{
window.moveTo(-4,-4);
window.resizeTo(screen.width+8,screen.availHeight+8);
}

}
