var win1Open = null

function displayImage(picName, windowName, windowWidth, windowHeight){
return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20) + ",height=" + (parseInt(windowHeight)+15)) 
}

function winClose(){
if(win1Open != null) win1Open.close() 
}

function doNothing(){}

function displayImage(picName, windowName, windowWidth, windowHeight){
var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
if(winHandle != null){
var htmlString = "<html><head><title>Picture</title></head>" 
htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"
htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=´Ý±â></a>"
htmlString += "</body></html>"
winHandle.document.open()
winHandle.document.write(htmlString)
winHandle.document.close()
} 
if(winHandle != null) winHandle.focus()
return winHandle
}


///////////////////////////////////////////


function sw_goto_byselect(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
     if (targetstr == 'blank') {
       window.open(sel.options[index].value, 'win1');
     } else {
       var frameobj;
       if ((frameobj = eval(targetstr)) != null)
       frameobj.location = sel.options[index].value;
     }
  }
}

//////////////////////////////////////

function menu_click(num){
if(num == 1){
        
		document.all.menu_1.style.display = 'block';
		document.all.menu_2.style.display = 'none';

}else if(num == 2){
       
		document.all.menu_1.style.display = 'none';
		document.all.menu_2.style.display = 'block';
		
}
}

////////////////////////////////////////

window.onerror = ErrorSetting 
var e_msg=""; 
var e_file=""; 
var e_line=""; 
function ErrorSetting(msg, file_loc, line_no) { 
e_msg=msg; 
e_file=file_loc; 
e_line=line_no; 
return true; 
} 
