
function DivOff(theDivName)
{	IniGlobs(); 
	if (null == theDivName || typeof(theDivName) == "undefined") return; 
	CollapseDiv(theDivName + "B"); // Hide Block text
	ExpandDiv(  theDivName + "M"); // Show More message
	CollapseDiv(theDivName + "L"); // Hide Less Message
}

function DivOn(theDivName)
{	IniGlobs(); 
	if (null == theDivName || typeof(theDivName) == "undefined") return; 
	ExpandDiv(  theDivName + "B"); // Show Block text
	ExpandDiv(  theDivName + "L"); // Show Less message
	CollapseDiv(theDivName + "M"); // Hide More message
}

function IniGlobs()
{	if ("undefined" != typeof(strRtl)) strIsRtl = strRtl;
	var divs = document.body.getElementsByTagName("DIV");
	var countDiv = 0;
	if (typeof(divs) != "undefined" && null != divs) countDiv = divs.length;
	allDivsInPage = new Array();
	for (i=0; i < countDiv; i++)if (typeof(divs[i].id) != "undefined" && null != divs[i].id && divs[i].id.length > 0)
		allDivsInPage[divs[i].id] = divs[i];
}

function ExpandDiv(theDivName)
{	IniGlobs();
	if (null == theDivName || typeof(theDivName) == "undefined") return; 
        var theDiv = allDivsInPage[theDivName]; 
        if (null == theDiv || typeof(theDiv) == "undefined") return;
	theDiv.style.display = "block";
}

function CollapseDiv(theDivName)
{	IniGlobs();
	if (null == theDivName || typeof(theDivName) == "undefined") return; 
        var theDiv = allDivsInPage[theDivName]; 
        if (null == theDiv || typeof(theDiv) == "undefined") return;
	theDiv.style.display = "none";
}

//------------------------------------------
// Google Find functions
//
// Voorbeeld aanroep:
// <FORM name="MyForm1">
//	<INPUT type="text" name="q" value="complexiteit" size="30">
//	<INPUT type="button" value="ZOEK TEXT" 
//		onclick="GoogleFindIt(this.form,'http://www.google.nl/search?hl=nl',
//			'site:www.complexiteit.nl')">
//	<INPUT type="button" value="ZOEK PLAATJES" 
//		onclick="GoogleFindIt(this.form,'http://images.google.nl/images?hl=nl',
//			'site:www.complexiteit.nl')">
// </FORM>
//------------------------------------------
function GoogleFindIt(form,base_url,append_search){
	var q=append_search;
	q = "&q=" + escape(form.q.value + " " + q);
	location.href=base_url + q;
};
