function toggle(id){
 target = document.getElementById(id);
 if (target.style.display == "none"){
  target.style.display = "";
 } else {
  target.style.display = "none";
 } 
}

function url(select) {
 location.href = select.options[select.options.selectedIndex].value;
}

function image(url) {
 preview = window.open(url, 'preview', 'width=660,height='+screen.height+',left=0,top=0,resizable=yes,menubar=no,directories=no,toolbar=no,scrollbars=yes');
 window.preview.focus();
}

function media(url) {
 preview = window.open(url, 'preview', 'width=660,height='+screen.height+',left=0,top=0,resizable=yes,menubar=no,directories=no,toolbar=no,scrollbars=yes');
 window.preview.focus();
}

function popupGoParent(url){
  try{
    if(window.opener&&!window.opener.closed){
      window.opener.location.href=url;
      window.opener.focus();
    }else{
      window.open(url,'Main','width=1024,height=768,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
    }
  }catch(ex){
    window.open(url,'Main','width=1024,height=768,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes');
  }
  window.close();
}











function dbresize() {

 target = document.getElementById('page-db-navi-left');
 dbc    = document.getElementById('page-db-content');
 next   = document.getElementById('page-navi-back');
 
 if (target.style.display == "none"){
  target.style.display = "";
  dbc.style.margin = "0 auto 0 170px";
  dbc.style.width = "696px";
 } else {
  target.style.display = "none";
  dbc.style.margin = "0 auto";
  dbc.style.width = "96%";
  next.style.display = "none";
 } 
}
