﻿function Blurtxt(txtID,dfstring,col)
{
	var txt=document.getElementById(txtID);
	if (txt!=null)
	{
		if (txt.value=="")
		{
			txt.value=dfstring;
			txt.style.color=col;
		}
	}
}

function Focustxt(txtID,dfstring,col)
{
	//alert(txtID);
	var txt=document.getElementById(txtID);
	if (txt!=null)
	{
		
		if (txt.value==dfstring)
		{
			txt.value="";
			txt.style.color=col;
		}
		return;
	}
}

function changeType(chk,txtId)
{   
    var txt=document.getElementById(txtId);   
    if(chk)
    {
	    txt.className="textRead";
	    txt.readOnly=true;
	    txt.value='';
	}
	else
	{
	    txt.className="text";
	    txt.readOnly=false;
	}
}

function  flist(list,response,head)
{     
	list.length=0;
	if (head!=null && head!="")
	{
		list.options.add(new  Option(head,''));  
	}
	if  (response.value!=null && response.value!="")   
	{  
  　	var   piArray   =   response.value.split(',');   
  　	for(var i=0;i<piArray.length;i++)   
  　	{   
  　　　	var   ary1   =   piArray[i].toString().split('|');   
  　　　	if (ary1.length>1)
  　　　		list.options.add(new  Option(ary1[1].toString(),ary1[0].toString()));  
  　	}               
	}
	return true;
}
function  flistOne(list,response,head)
{     
	list.length=0;
	if (head!=null && head!="")
	{
		list.options.add(new  Option(head,''));  
	}
	if  (response.value!=null && response.value!="")   
	{  
  　	var   piArray   =   response.value.split(',');   
  　	for(var i=0;i<piArray.length;i++)   
  　	{   
  　　　	var   ary1   =   piArray[i].toString().split('|');   
  　　　	if (ary1.length>1)
  　　　		list.options.add(new  Option(ary1[1].toString(),ary1[0].toString()));  
  　	}
  　	if(list.length>1)
  　	{
  　	    list.selectedIndex =1; 
  　	}                          
	}
	return true;
}
function isCorrectInput(ss){
  var s = ss.value;
  var pos1 = s.indexOf("`");
 
  if(pos1>-1){
   return false;
  }
	return true;
}

function msgNoQuoteJpn()
{
	return ("欄にある「`」の記号は使用できません");
}