var win = null;
function NewWindow(mypage,myname,w,h,scroll)
{
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  TopPosition = TopPosition - 20;
  h = h - 20;
  settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+'no';
  win = window.open(mypage,myname,settings)
}

function window_max()
{
   window.resizeTo(screen.width, screen.height);
   window.moveTo(0,0);
}

function window_ini(w, h)
{
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
   window.resizeTo(w, h);
   window.moveTo(LeftPosition,  TopPosition-20);
}

function SetFocus(FormName, EditName)  {
  Edit=document.forms[FormName].elements[EditName];  
  Edit.focus();    	 
}

function ButtonClick(address) {
  document.frmAbout.action=address;
  document.frmAbout.submit();
}

 function ContactWindow () {
   NewWindow('scheme.asp', 'frmContact', 716, 686, 'yes');
}

function DetailClick(id) {
  str=id+'.html';
  NewWindow(str, 'frmDetail', 716, screen.height-90, 'yes');
}

  function CheckOrder() {
    objItem = window.event.srcElement;
    state=objItem.checked;
    id=objItem.id;
    exist = (strCheckOrder.indexOf(id)<0) ? false: true;
    if (state && !exist) {
      strCheckOrder=strCheckOrder+id+'|' ;
    };
    if (!state && exist) {
      strCheckOrder=strCheckOrder.replace(id+'|','');
    };
    IsChange=1;
  }
