//Function NameopenNewWindow
//ざ翾秨跌怠肚癟穝旧
//把计弧跌怠隔畖嘿の闽砞﹚
function openNewWindow(url,msg,URLtoOpen, windowName, windowFeatures) { 
  alert(msg);
  newWindow=window.open(URLtoOpen, windowName, windowFeatures);
  location.href=url;
}
//Function NameopenMyWindow
//ざ翾秨跌怠
//把计弧跌怠隔畖嘿の闽砞﹚
function openMyWindow(URLtoOpen, windowName, windowFeatures) { 
  newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
//Function checkAll
//ざ残は匡 checkbox ン
//把计弧饼は匡逆嘿
function checkAll(str) {
	var a = document.getElementsByName(str);
	var n = a.length;
	for (var i=0; i<n; i++)
	a[i].checked = window.event.srcElement.checked;
}

//Function NameredirectURL
//ざ翾穝戈穝旧呼
//把计弧msg:铬癟,url:穝旧呼
//alert
function redirectURL(msg,url){
    alert(msg);
	location.href=url;
}

//Function NamelogoutURL
//ざ翾盯竚筁祅穝旧呼
//把计弧msg:铬癟,url:穝旧呼
//alert
function logoutURL(msg,url){
  alert(msg); 
  setTimeout("parent.location='"+url+"'")
}

//Function NameCheck_user_id
//ざ翾浪琩块眀腹琌Τ狡
//把计弧msg:铬癟,chk:浪琩块眀腹琌Τ狡
//alert
function Check_user_id(msg,chk){
  alert(msg); 
  if (chk=="failed"){
	opener.document.reg.id.value=""; 
	opener.document.reg.id.focus();
  }
  window.close();
}
//Function NameDel_Confirm
//ざ翾埃戈絋粄浪琩
//把计弧url:埃祘Α呼,mem_no埃戈ID
//alert
function Del_Confirm(url,mem_no,msg)
{
  if(confirm(msg))
		location.href=url+mem_no;
}
//Function NameDel_Confirm
//ざ翾埃戈絋粄浪琩
//把计弧url:埃祘Α呼,mem_no埃戈ID
//alert
function Point_Confirm(url,mem_no,msg)
{
  if(confirm(msg))
		location.href=url+mem_no;
		//alert(url+mem_no)
}
//Function NameDel_Confirm
//ざ翾埃戈絋粄浪琩
//把计弧url:埃祘Α呼,mem_no埃戈ID
//alert
function Reply_Confirm(url,mem_no,msg)
{
  if(confirm(msg))
  form1.submit()
		//location.href=url+mem_no;
		//alert(url+mem_no)
}
//Function NameMM_jumpMenu
//ざ翾铬匡虫
//把计弧targ:秨币呼よΑ,硈挡:restore:
//alert
function MM_jumpMenu(targ,url,selObj,restore){ //v3.0
  eval(targ+".location='"+url+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//Function NamePOPupwin
//ざ翾秨跌怠皌秸俱竚いㄏノ
//把计弧page id肚
//礚

function POPupwin(page,id) {
   var vstr, rvalue
   rvalue = window.open(page+id,"popup",'height=400,width=400,toolbar=no,scrollbars=yes,resizable=yes');
}

//Function NameResize_Move
//ざ翾盢秨币跌怠秸俱逆簿い丁
//把计弧myTableID嘿
//wΤ糴 hΤ蔼

function Resize_Move(myTable){
w=eval(document.all[myTable].width)+32; 
h=eval(document.all[myTable].height)+40;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
//alert(w);
//alert(h);
window.resizeTo(w,h);
window.moveTo(LeftPosition,TopPosition)
}

function text_chk(text){
    alert(text);
	history.back()
}  

function view_class_alert(text){
    alert(text);
	//history.back()
} 
//Function NamefucPWDchk
//ざ翾浪琩琌Τ獶计┪ダ
//把计弧璶浪琩才﹃
//0Τ 1场计┪ダ

/*  var ch,i,temp,check;
  var strSource ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

  for (i=0;i<=(str.length-1);i++)
  {
  
    ch = str.charAt(i);
    temp = strSource.indexOf(ch);
    if (temp==-1) 
    {
     check = 0;
    }
  }

  if (check==0)
  {
     alert('ぃ眔块ダの计');
	 return false;
  }

  if (strSource.indexOf(ch)==-1)
  {
     alert('ぃ眔块ダの计');
	 return false;
  }
*/

//Function checkImg
//ざ残ㄌ瓜秨﹍跌怠
var imgObj;
function checkImg(theURL,winName){
  if (typeof(imgObj) == "object"){
    if ((imgObj.width != 0) && (imgObj.height != 0))
      OpenFullSizeWindow(theURL,winName, ",width=" + (imgObj.width+20) + ",height=" + (imgObj.height+30));
    else
      setTimeout("checkImg('" + theURL + "','" + winName + "')", 100)
  }
}

function OpenFullSizeWindow(theURL,winName,features) {
  var aNewWin, sBaseCmd;
  sBaseCmd = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,";
  if (features == null || features == ""){
    imgObj = new Image();
    imgObj.src = theURL;
    checkImg(theURL, winName)
  }
  else{
    aNewWin = window.open(theURL,winName, sBaseCmd + features);
    aNewWin.focus();
  }
}
