/*
'*<versioninfo>4.00.00 (2011-10-10)</versioninfo>
'*<componentinfo>CMS-Library</componentinfo>
'*<change>4.00.00 (2011-10-10);tvl:Initial version</change>
'*<change>3.40.02 (2010-07-26);tvl;bugfix null objects</change>

 * This function parses ampersand-separated name=value argument pairs from
 * the query string of the URL. It stores the name=value pairs in
 * properties of an object and returns that object. Use it like this:
 *
 * var args = getArgs( );  // Parse args from URL
 * var q = args.q || "";  // Use argument, if defined, or a default value
 * var n = args.n ? parseInt(args.n) : 10;
 */
function getArgs( ) {
    var args = new Object( );
    var query = location.search.substring(1);     // Get query string
    var pairs = query.split("&");                 // Break at ampersand
    for(var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf('=');          // Look for "name=value"
        if (pos == -1) continue;                  // If not found, skip
        var argname = pairs[i].substring(0,pos);  // Extract the name
        var value = pairs[i].substring(pos+1);    // Extract the value
        value = decodeURIComponent(value);        // Decode it, if needed
        args[argname] = value;                    // Store as a property
    }
    return args;                                  // Return the object
}

/*
*	This function activates HTML elements with a visibility style
*	The ID's of these object are supplied using a # as seperator
* The ID string is saved so that at the next call they can be hidden
* If the previous ID string si not present the stdId is supposed to be valid
*/
var	activeId=new Array();									// reserve an array
var	prevId=new Array();										// restore string

function MakeActive(entry,stdId,newId)
{
	var	obj2Hide;
	var	obj2Visible;

	
	if(activeId[entry]==null)								// is this the first call
	{
		var DeactIds=stdId.split("#");				// if so use the stdId string to deactivate
	}
	else
	{
		var DeactIds=activeId[entry].split("#");	// else use the previously saved string
	}
	prevId[entry]=activeId[entry];					// save the previous ones
	activeId[entry]=newId;									// save the current Id's for next time
	ActIds=newId.split("#");								// prepare the ones to make visible
	
	for(var i=0;i<DeactIds.length;i++)			// hide old ID's
	{
		obj2Hide=MM_findObj(DeactIds[i]);
		if(obj2Hide!=null)
			obj2Hide.style.visibility="hidden";
	}

	for(var i=0;i<ActIds.length;i++)
	{
		obj2Hide=MM_findObj(ActIds[i]);
		if(obj2Hide!=null)		
			obj2Hide.style.visibility="visible";	// unhide new ones
	}
	return;
}

function ShowHideObj( Objx, SH)
{
	var	obj2Use;

// alert("HS");

	obj2Use=MM_findObj(Objx);

	if( SH=="show")
	{
		obj2Use.prevx=obj2Use.style.visibility;	// save old status
		obj2Use.style.visibility="visible";	// unhide new ones
	}
	else
	{
		obj2Use.style.visibility=obj2Use.prevx;	// unhide new ones
	}			
}

/* function RestorePrev(entry, def)
{
	
	if(prevId[entry]!=null)
	{
		def=prevId[entry];
	}
//	alert("->"+activeId[entry]+"->"+def);
	
	MakeActive(entry,activeId[entry],def);
	
	ActIds=def.split("#");	
	initieer(entry,ActIds[2],ActIds[1],ActIds[3]);
	
	return;
}
*/		
	





                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

