function SubmitModForm($this,$target,$url,$winstyle){
  var $str='' ;
  for ($i=0;$i<document.forms[0].elements.length;$i++){
       if(!(document.forms[0].elements[$i].type=='checkbox' || document.forms[0].elements[$i].type=='radio') || document.forms[0].elements[$i].checked ){
          $and='&';
	  try{
          $value=document.forms[0].elements[$i].value ;
          $value=$value.replace(/#/g,'%23');
          $value=$value.replace(/\?/g,'%3F');
          $value=$value.replace(/&/g,'%26');
          $value=$value.replace(/\+/g,'%2B');
          $str=$str+$and+document.forms[0].elements[$i].name+'='+$value ;
	  }
	  catch(e){}
       }
  }
  $url=$url+$str;
  window.showModalDialog($url,window,$winstyle);

}
function SubmitPForm($this,$target,$url,$WinState,$Width,$Height,$WinPosition,$Left,$Top,$winstyle){
  var $fullscreen="";
  //$this.form.action=$url;
  //rewrite加如下语句
  if(window.location.href.lastIndexOf("/mod_")>0){
    $url=$url.replace(/shell.php\?/g,'mod_');
    $url=$url.replace(/=/g,'.');
  }
  //rewrite加如上语句
  //document.forms[0].method='post';
  document.forms[0].action=$url;
  if ($target!=''){
    //$this.form.target=$target;
    document.forms[0].target=$target;
    if($WinState=='max'&&$Width!=0){
    $fullscreen="fullscreen=3,";
    }
    else if ($WinState=='max'){
    $Width = screen.Width ;
    $Height =screen.Height ;
    $Left =0 ;
    $Top =0 ;
    }
    if ($WinPosition=='center' && $WinState!='max'){
    $Left= (screen.Width-$Width)/2 ;
     if (document.compatMode && document.compatMode != "BackCompat")
       $Top = (document.documentElement.clientHeight-$Height)/2 ;
     else
       $Top = (document.body.clientHeight-$Height)/2 ;
    }
    $winstyle='width='+$Width+',height='+$Height+',left='+$Left+',top='+$Top+','+$fullscreen+$winstyle;
    window.open('about:blank', $target, $winstyle) ;
  }
  //$this.form.submit();
  //$this.form.target='';
  document.forms[0].submit();
  document.forms[0].target='';
  //alert(document.forms[0].action);
}
function SubmitGForm($this,$target,$url,$WinState,$Width,$Height,$WinPosition,$Left,$Top,$winstyle){
  var $str='' ,$fullscreen="";
  for ($i=0;$i<document.forms[0].elements.length;$i++){
       if(!(document.forms[0].elements[$i].type=='checkbox' || document.forms[0].elements[$i].type=='radio') || document.forms[0].elements[$i].checked ){
          $and='&';
	  try{
          $value=document.forms[0].elements[$i].value;
          $value=$value.replace(/#/g,'%23');
          $value=$value.replace(/\?/g,'%3F');
          $value=$value.replace(/&/g,'%26');
          $value=$value.replace(/\+/g,'%2B');
          $str=$str+$and+document.forms[0].elements[$i].name+'='+$value;
	  }
	  catch(e){}
       }
  }
  //rewrite加如下语句
  if(window.location.href.lastIndexOf("/mod_")>0){
    $url=$url.replace(/shell.php\?/g,'mod_');
    $url=$url.replace(/=/g,'.');
    $str=$str.replace(/=/g,'.');
    $str=$str.replace(/&/g,'|');
  }
  //rewrite加如上语句
  $url=$url+$str;

  if ($target!=''){
    //$this.form.target=$target;
    if($WinState=='max'&&$Width!=0){
    $fullscreen="fullscreen=3,";
    }
    else if ($WinState=='max'){
    $Width = screen.Width ;
    $Height =screen.Height ;
    $Left =0 ;
    $Top =0 ;

    }
    if ($WinPosition=='center' && $WinState!='max'){
    $Left= (screen.Width-$Width)/2 ;
     if (document.compatMode && document.compatMode != "BackCompat")
       $Top = (document.documentElement.clientHeight-$Height)/2 ;
     else
       $Top = (document.body.clientHeight-$Height)/2 ;
    }
    $winstyle='width='+$Width+',height='+$Height+',left='+$Left+',top='+$Top+','+$fullscreen+$winstyle;
    window.open($url, $target, $winstyle) ;
  }
  else{
    window.open($url,'_self', $winstyle) ;
  }

}


