
 intTimer_Scroll = false;

 function Enlarge(strURL)
  {
   objWindow = window.open(
                    strURL,
                    'wndInput',
                    'height=780, width=720, scrollbars=yes, toolbar=no, statusbar=no, locationbar=no, top=' + ((screen.height / 2) - 300) + ', left='  + ((screen.width / 2) - 250)
                    );

   if(objWindow.focus)
    {
     objWindow.focus();
    }
  }

 function Manipulate_URI(elmParent)
  {
   var elmContainer = document.getElementById('thumbnail');

   elmParent.href = elmParent.href + '?intScroll=' + elmContainer.scrollLeft

   return true;
  }

 function Scroll(blnStart, blnDirection_Right)
  {
   if (blnStart)
    {
     if (blnDirection_Right)
      {
       intTimer_Scroll = setTimeout("_Scroll_Move(true)", 100);
      }
     else
      {
       intTimer_Scroll = setTimeout("_Scroll_Move(false)", 100);
      }
    }
   else
    {
     clearTimeout(intTimer_Scroll);

     intTimer_Scroll = false;
    }

   return true;
  }

 function _Scroll_Move(blnDirection_Right)
  {
   var elmContainer = document.getElementById('thumbnail');

   if (blnDirection_Right)
    {
     elmContainer.scrollLeft += 6;

     intTimer_Scroll = setTimeout("_Scroll_Move(true)", 20);
    }
   else
    {
     elmContainer.scrollLeft -= 6;

     intTimer_Scroll = setTimeout("_Scroll_Move(false)", 20);
    }

   return true;
  }

 function _Scroll_Set()
  {
   if (location.href.indexOf("?") > -1)
    {
     var elmContainer = document.getElementById('thumbnail');

     elmContainer.scrollLeft = parseInt(location.href.substring(location.href.indexOf("?")).replace("?intScroll=", ""));
    }
  }

	function Search(strQuery)
	 {
  	frmParent = document.getElementById('frmSearch');
  	aryelmTD  = frmParent.getElementsByTagName('td');

			for (var intOffset = 0; intOffset < aryelmTD.length; intOffset++)
			 {
    	var elmContent = aryelmTD[intOffset].getElementsByTagName('small');

					if (elmContent.length > 0)
						{
					  if (elmContent[0].innerHTML.toLowerCase().indexOf(strQuery.toLowerCase()) == -1)
					   {
									elmContent[0].parentNode.style.display = 'none';
        }
       else
        {
        	elmContent[0].parentNode.style.display = 'block';
        }
      }
    }
  }

 function Contact_Check(strLanguage)
  {
   if (document.getElementById('txtName').value == '')
    {
     if (strLanguage == 'Dutch') { alert('Veld naam niet ingevuld.'); } else { alert('Please fill out your name.'); }

     return false;
    }

   if (document.getElementById('txtEmail').value == '')
    {
     if (strLanguage == 'Dutch') { alert('Vul alstublieft uw mailadres in.'); } else { alert('Please fill out your emailaddress.'); }

     return false;
    }

   if (strLanguage == 'Dutch') { alert('Dank voor uw aanvraag, wij nemen contact met op.'); } else { alert('Thank you for your request. We will contact you shortly.'); }

   return true;
  }

 function Contact_Form(strLanguage, elmParent)
  {
   var strHTML = '<form method="POST"><table>' +
                 '<tr><td>%Name%</td><td><input type="hidden" name="blnMail" value="true" /><input id="txtName" style="width: 250px;" type="text" name="Naam" value="" /></td></tr>' +
                 '<tr><td>%Subject%</td><td><input id="txtSubject" style="width: 250px;" type="text" name="Onderwerp" value="" /></td></tr>' +
                 '<tr><td>%Phone%</td><td><input id="txtEmail" style="width: 250px;" type="text" name="Telefoonnummer" value="" /></td></tr>' +
                 '<tr><td>Email</td><td><input id="txtEmail" style="width: 250px;" type="text" name="Email_Adres" value="" /></td></tr>' +
                 '<tr><td valign="top">%Message%</td><td><textarea name="Bericht" style="width: 250px; height: 100px;"></textarea></td></tr>' +
                 '<tr><td align="center" colspan="2"><input type="submit" value="%Caption%" onclick="%Script%"></td></tr>' +
                 '</table></form>';

   if (strLanguage == 'Dutch')
    {
     strHTML = strHTML.replace('%Name%', 'Naam');
     strHTML = strHTML.replace('%Subject%', 'Onderwerp');
     strHTML = strHTML.replace('%Message%', 'Bericht');
     strHTML = strHTML.replace('%Phone%', 'Telefoon nr.');
     strHTML = strHTML.replace('%Caption%', 'Verzenden');
     strHTML = strHTML.replace('%Script%', 'return Contact_Check(\'Dutch\');');
    }
   else if (strLanguage == 'English')
    {
     strHTML = strHTML.replace('%Name%', 'Name');
     strHTML = strHTML.replace('%Subject%', 'Subject');
     strHTML = strHTML.replace('%Message%', 'Message');
     strHTML = strHTML.replace('%Phone%', 'Phone nr.');
     strHTML = strHTML.replace('%Caption%', 'Send');
     strHTML = strHTML.replace('%Script%', 'return Contact_Check(\'English\');');
     
     strHTML = strHTML.replace('name="Naam"', 'name="Name"');
     strHTML = strHTML.replace('name="Onderwerp"', 'name="Subject"');
     strHTML = strHTML.replace('name="Telefoonnummer"', 'name="Phone_number"');
     strHTML = strHTML.replace('name="Email_Adres"', 'name="Email_Address"');
     strHTML = strHTML.replace('name="Bericht"', 'name="Message"');

    }
   
   elmParent.innerHTML = strHTML;
  }
