	
if (document.layers)
{
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById)
{
		document.onmousedown=clickIE4;
} 
document.oncontextmenu=new Function("return false;")


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 < '1272')
        {
            //valResolution = "1024";
           document.getElementById("txtstandardviewpath").value='thumbnails\\large2\\';
            document.getElementById("txtMagnifiedViewPath").value='thumbnails\\largest\\';
            
             //document.getElementById("ZoomLevelLarge4").checked=true;
        }
        else if (screen.width < '1392')
        {
            //valResolution = "1280";
            document.getElementById("txtstandardviewpath").value='thumbnails\\largest\\';
            document.getElementById("txtMagnifiedViewPath").value='thumbnails\\largest2\\';
            //document.getElementById("ZoomLevelLargest5").checked=true;
            
        }
        else if (screen.width < '1592')
        {
            //valResolution = "1400";
             document.getElementById("txtstandardviewpath").value='thumbnails\\largest\\';
            document.getElementById("txtMagnifiedViewPath").value='thumbnails\\largest2\\';
           //  document.getElementById("ZoomLevelLargest5").checked=true;
        
        }
        else if (screen.width >= '1592')
        {
            //valResolution = "1600";
             document.getElementById("txtstandardviewpath").value='thumbnails\\largest2\\';
            document.getElementById("txtMagnifiedViewPath").value='thumbnails\\largest3\\';
           // document.getElementById("ZoomLevelLargest6").checked=true;
           
        }
	
    document.getElementById("ZoomLevelFitScreen").checked=true;
		
			 if (windowWidth < '1272')
        {
            //valResolution = "1024";
            document.getElementById("detail").height=windowHeight-26
        }
        else if (windowWidth < '1392')
        {
            //valResolution = "1280";
            document.getElementById("detail").height=windowHeight-32
        }
        else if (windowWidth < '1592')
        {
            //valResolution = "1400";
            document.getElementById("detail").height=windowHeight-35
        }
        else if (windowWidth >= '1592')
        {
            //valResolution = "1600";
            document.getElementById("detail").height=windowHeight-40
        }
			
//	            if (windowWidth>='1596')
//				{
//						
//				document.getElementById("detail").height=windowHeight-40;
//				//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 < '1272')
        {
            //valResolution = "1024";
            document.getElementById("detail").height=windowHeight-26
        }
        else if (windowWidth < '1392')
        {
            //valResolution = "1280";
            document.getElementById("detail").height=windowHeight-32
        }
        else if (windowWidth < '1592')
        {
            //valResolution = "1400";
            document.getElementById("detail").height=windowHeight-35
        }
        else if (windowWidth >= '1592')
        {
            //valResolution = "1600";
            document.getElementById("detail").height=windowHeight-40
        }
				
	//	alert(windowWidth);
		document.getElementById("searchsrc").height=windowHeight-200;	
		document.getElementById("archiveWindow").style.height=windowHeight-200;
		//document.getElementById("helpwindow").style.height=windowHeight-95;
		document.getElementById("sharewindow").style.height=windowHeight-200;        
        //document.getElementById("help_dialog").style.height=windowHeight-200;       
       // document.getElementById("saveWindow").style.height=windowHeight-200;
        document.getElementById("CommentsWindow").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?ed="+document.getElementById("hdQEid").value+"&pgno=" + document.Form1.pgno.value + "&mode=" +document.Form1.mode.value+"&Standardview="+ document.getElementById("txtstandardviewpath").value +"&clintheight=" + windowHeight+ '&clintwidth=' +windowWidth + "&fitheight="+ 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);
}

}


