function showformdata()
{
   var strN="";
   var strV="";
   for (i=0;i<document.forms[0].length;i++)
   {

      if (document.forms[0].item(i).type=="radio")
      {
         isradiochecked=false;
         rname=document.forms[0].item(i).name;
         rcount=eval("document.forms[0]."+rname+".length")
         if (rcount>=2)
         {
            for (j=0; j<rcount; j++)
            {
               if (document.forms[0].item(i+j).checked)
               {
                  rvalue=document.forms[0].item(i+j).value;
                  isradiochecked=true;
                  break;
               }
            }
            strN=strN+rname+"|";
            if (isradiochecked==false)
               strV=strV+"Not selected"+"|";
            else
               strV=strV+rvalue+"|";
            i+=rcount-1;
         }
         else
         {
            strN=strN+document.forms[0].item(i).name+"|";
            if (document.forms[0].item(i).checked)
               strV=strV+document.forms[0].item(i).value+"|";
            else
               strV=strV+"Not selected"+"|";
         }
      }
      if (document.forms[0].item(i).type=="checkbox")
      {
         strN=strN+document.forms[0].item(i).name+"|";
         if (document.forms[0].item(i).checked)
            strV=strV+"Checked"+"|";
         else
         {
            if (document.forms[0].item(i).validate=="yes")
            {
               alert (document.forms[0].item(i).errormsg);
               document.forms[0].item(i).focus();
               return false;
            }
            else
               strV=strV+"Not checked"+"|";
         }
      }
      if (document.forms[0].item(i).type=="select-one")
      {
         strN=strN+document.forms[0].item(i).name+"|";
         if (document.forms[0].item(i).selectedIndex!=-1)
         {
            var sindex=document.forms[0].item(i).selectedIndex;
            strV=strV+document.forms[0].item(i)[sindex].text+"|";
         }
         else
            strV=strV+"Not selected"+"|";
      }
      if (document.forms[0].item(i).type=="text")
      {
         if (document.forms[0].item(i).validate=="yes")
         {
            if (document.forms[0].item(i).value.length==0)
            {
               alert (document.forms[0].item(i).errormsgrequired);
               document.forms[0].item(i).focus();
               return false;
            }
         }
         if (document.forms[0].item(i).inputmask=="numeric")
         {
            if (isNaN(document.forms[0].item(i).value))
            {
               alert (document.forms[0].item(i).errormsginputmask)
               document.forms[0].item(i).focus();
               return false;
            }
         }
         else if (document.forms[0].item(i).inputmask=="email")
         {
            var j=document.forms[0].item(i).value;
            if ((j.indexOf("@")==-1) || (j.indexOf(".")==-1))
            {
               alert (document.forms[0].item(i).errormsginputmask)
               document.forms[0].item(i).focus();
               return false;
            }
         }
         else if (document.forms[0].item(i).inputmask=="alphanumeric")
         {
            if (!isNaN(document.forms[0].item(i).value))
            {
               alert (document.forms[0].item(i).errormsginputmask)
               document.forms[0].item(i).focus();
               return false;
            }
         }
         else
         {
            ;
         }
         strN=strN+document.forms[0].item(i).name+"|";
         strV=strV+document.forms[0].item(i).value+"|";
      }
      if (document.forms[0].item(i).type=="textarea")
      {
         strN=strN+document.forms[0].item(i).name+"|";
         strV=strV+document.forms[0].item(i).value+"|";
      }
   }
   strN=strN.substring(0,strN.length-1);
   strV=strV.substring(0,strV.length-1);
   document.forms[0].strNames.value=strN;
   document.forms[0].strValues.value=strV;
   return true;
//alert(strN+","+strV)
}

function tours(tourid)
{
    win=window.open("../showtours.php?tourid="+tourid,"win","menubar=0, scrollbars=0, resize=1,height=500,width=525");
}

function activatepopup(id,h,w)
{
   h=h+25;
   w=w+20;
   winprops="height="+h+",width="+w+",menubar=0,scrollbars=0,resize=1";
//   win=window.open("getlargeimage.php?id="+id,"win",winprops);
   win=window.open(id,"win",winprops);
}

function openwindow()
{
   win=window.open("https://tlweb.alandiaserverfarm.com/tallinkSE/index.jsp?usercode=TLWPSE","win","width=800,height=600,toolbar=no");
}

function openwindow2()
{
   win=window.open("http://www.tallink.se/forms/1.php","win","width=600,height=400,toolbar=no");
}
