// JavaScript Document
function popup(url)
{
   window.open(url,"Win","width=400 height=325 left=80");
}

function popup_app(url)
{
   window.open(url,"AppWin","width=800 height=600 left=80");
}

function popup_license(url)
{
   window.open(url,"LicWin","width=580 height=600 scrollbars=yes left=80");
}

function popup_page(url)
{
   window.open(url,"pageWin","width=800 height=600 scrollbars=yes left=80");
}

function popup_url(url)
{
   window.open(url,"","width=800 height=600 left=80 resizable=yes scrollbars=yes toolbar=yes location=yes menubar=yes");
}

function popup_images(url)
{
   window.open(url,"","width=800 height=600 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=no");
}

function popup_tools01(url)
{
   window.open(url,"tools01","width=500 height=400 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools02(url)
{
   window.open(url,"tools02","width=500 height=400 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools03(url)
{
   window.open(url,"tools03","width=500 height=400 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools04(url)
{
   window.open(url,"tools04","width=500 height=400 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools05(url)
{
   window.open(url,"tools05","width=500 height=400 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools06(url)
{
   window.open(url,"tools06","width=500 height=400 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=yes");
}


function popup_tools07(url)
{
   window.open(url,"tools07","width=500 height=400 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=yes");
}


function popup_tools08(url)
{
   window.open(url,"tools08","width=500 height=400 left=80 resizable=no scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools09(url)
{
   window.open(url,"tools09","width=1000 height=500 left=5 resizable=yes scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools10(url)
{
   window.open(url,"tools10","width=1000 height=500 left=5 resizable=yes scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools11(url)
{
   window.open(url,"tools11","width=1000 height=500 left=5 resizable=yes scrollbars=yes toolbar=no location=no menubar=yes");
}

 
function popup_tools12(url)
{
   window.open(url,"tools12","width=1000 height=500 left=5 resizable=yes scrollbars=yes toolbar=no location=no menubar=yes");
}

function popup_tools13(url)
{
   window.open(url,"tools13","width=1000 height=500 left=5 resizable=yes scrollbars=yes toolbar=no location=no menubar=yes");
}

function isNum(field,field_name) {
   var valid = "0123456789.-"
   var ok = "yes";
   var temp;

   for (var i=0; i<field.value.length; i++) {
      temp = "" + field.value.substring(i, i+1);
      if (valid.indexOf(temp) == "-1") ok = "no";
   }

   if (ok == "no") {
      alert(field_name + ' - ½Ð¿é¤J¼Æ¦r.');
      return false;
   }
   else {
      return true
   }
}

function trim(strText) {
    // this will get rid of leading spaces
    while (strText.substring(0,1) == ' ')
        strText = strText.substring(1, strText.length);

    // this will get rid of trailing spaces
    while (strText.substring(strText.length-1,strText.length) == ' ')
        strText = strText.substring(0, strText.length-1);

    return strText;               
}