<!--

function smallit(){            
	var height1=PhotoViewer.images1.height;            
	var width1=PhotoViewer.images1.width;            
	PhotoViewer.images1.height=height1/1.2;            
	PhotoViewer.images1.width=width1/1.2;           
}             
          
function bigit(){            
	var height1=PhotoViewer.images1.height;            
	var width1=PhotoViewer.images1.width;            
	PhotoViewer.images1.height=height1*1.2;          
	PhotoViewer.images1.width=width1*1.2;           
}             
function fullit(src)
{
	var width_s=screen.width-10;
	var height_s=screen.height-30;
	window.open(src, "PhotoView", "width="+width_s+",height="+height_s+",left=0,top=0,location=yes,toolbar=yes,status=yes,resizable=yes,scrollbars=yes,menubar=yes,directories=yes");
}
function realsize()
{
	PhotoViewer.images1.height=PhotoViewer.images2.height;     
	PhotoViewer.images1.width=PhotoViewer.images2.width;
	PhotoViewer.block1.style.left = 0;
	PhotoViewer.block1.style.top = 0;
	
}
function featsize()
{
	var width1=PhotoViewer.images2.width;            
	var height1=PhotoViewer.images2.height;            
	var width2=760;            
	var height2=400;            
	var h=height1/height2;
	var w=width1/width2;
	if(height1<height2&&width1<width2)
	{
		PhotoViewer.images1.height=height1;            
		PhotoViewer.images1.width=width1;           
	}
	else
	{
		if(h>w)
		{
			PhotoViewer.images1.height=height2;          
			PhotoViewer.images1.width=width1*height2/height1;           
		}
		else
		{
			PhotoViewer.images1.width=width2;           
			PhotoViewer.images1.height=height1*width2/width1;          
		}
	}
	PhotoViewer.block1.style.left = 0;
	PhotoViewer.block1.style.top = 0;
}


 function Search(form)
 {
	 var title=trim(form.Title.value);
	 var action=form.action;		
	 if (title!="")
	 {		 	
		document.location=action+"?Title="+escape(title);
	 }
	 else
	 {
		 alert("ÇëÊäÈëËÑË÷ÄÚÈÝ!");	
		 form.Title.value="";
		 form.Title.focus();		
		 return false;
	 }
 }
 
/**********************************/
/******       ½ØÈ¡¿Õ¸ñ       ******/
/**********************************/ 
function trim(str){
    	var i = 0;
        while ((i < str.length)&&((str.charAt(i) == " ")||(str.charAt(i) == "¡¡"))){i++;}
    	var j = str.length-1;
    	while ((j >= 0)&&((str.charAt(j) == " ")||(str.charAt(j) == "¡¡"))){j--;}
    	if( i > j ) 
    		return "";
    	else
    		return str.substring(i,j+1);
}
//-->

