<!--

// whitespace characters
var whitespace = " \t\n\r";


function isEmptyString(s) { 
	return ((s == null) || (s.length == 0)) 
}


function isEmpty(s)	{
	var i;
	if (isEmptyString(s)) {
		return true;
	}
    for (i = 0; i < s.length; i++)    {
		var c = s.charAt(i);
        if (whitespace.indexOf(c) == -1) return false;
    }
    return true;
}


function isPrice(sText) {
	var ValidChars = "0123456789.";
	var IsNumber=true;
	var Char;
	for (i=0; i<sText.length && IsNumber == true; i++) { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) { IsNumber = false; }
	}
	return IsNumber;
}


function gox(url) {
	document.location.href = url;
	return false;
}


function gon(nid) {
	document.location.href="viewNews.asp?nid=" + nid;
	return false;
}


function gop(catid,pid) {
    if (catid == null)
    {
	    document.location.href="viewProduct.asp?pid=" + pid;
	}
	else
	{
	    document.location.href="viewProduct.asp?catid=" + catid + "&pid=" + pid;
	}
	return false;
}


function gow(wid) {
	document.location.href="viewWorkshop.asp?wid=" + wid;
	return false;
}


function goc(cid) {
	document.location.href="category.asp?cid=" + cid;
	return false;
}


function add2cart(iPVID) {
	document.form1.action="shoppingCart.asp";
	document.form1.pvid.value=iPVID;
	document.form1.submit();
}


function GetEditorTxt()
{
	// Get the editor instance that we want to interact with.
	var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;

	// Get the Editor Area DOM (Document object).
	var oDOM = oEditor.EditorDocument ;

	var txt = "";

	// The are two diffent ways to get the text (without HTML markups).
	// It is browser specific.

	if ( document.all )		// If Internet Explorer.
	{
		txt = oDOM.body.innerText;
	}
	else					// If Gecko.
	{
		var r = oDOM.createRange() ;
		r.selectNodeContents( oDOM.body ) ;
		txt = r.toString() ;
	}

	return txt;
}


function SetMsgTimer(seconds)
{
	if (document.getElementById('errMsg') != null)
	{
		window.setTimeout("document.getElementById('errMsg').style.display='none';", seconds * 1000);
	}
}


function validEmail(emailAddress) {
	var emailRegxp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z])+$/;
	var ret = emailRegxp.test(emailAddress);
	return ret;
}


function woordenboek(woord)
{
    window.open("woordenboek_popup.asp?woord=" + woord, "woordenboek_popup", "width=400, height=300, location=0, status=0, scrollbars=1, menubar=0, toolbar=0");
}


function Split2Columns(parentID, tagName, className) 
{
	var leftDiv = document.getElementById("leftColumn");
	var rightDiv = document.getElementById("rightColumn");

	var pap = document.getElementById(parentID);
	var c = pap.getElementsByTagName(tagName);

	var i = 0;
	while (i < c.length) 
	{
		if (c[i].className == className) 
		{
			leftDiv.appendChild(c[i]).style.visibility = "visible";  //append child and make it visible
			if (i < c.length) { rightDiv.appendChild(c[i]).style.visibility = "visible"; }
		}
	}
}


function showEl(el) 
{
	if (el.style.display == "" || el.style.display == "none") { el.style.display = "block"; }
	else {el.style.display = "none";}
}

//-->
