function Init (pageID,parentID,siteID,homeURL) {
	
	/*MENU*/
	//Iterates over all menuitems (e.g #menu ul li.menuitem)
		$$(".menuitem").each(function(menuitem,i) {

			//If the current page is among the menu items
			if(menuitem.id=='li'+pageID) {
				menuitem.getChildren().each(function(child,j) {			
					if(child.getTag() == 'ul') {
						child.setStyle('display','block');
					}
				});
				menuitem.addClass("selected");				
			}

			//If the current parent page is not the startpage, and the current parent page is among the menu items
			else if((parentID != siteID) && menuitem.id=='li'+parentID) {
				menuitem.getChildren().each(function(child,j) {			
					if(child.getTag() == 'ul') {
						child.getChildren().each(function(grandchild,k) {
							if(grandchild.getTag() == 'li') {
							    if(grandchild.id == 'li'+pageID)
									grandchild.addClass('selected');
								child.setStyle('display','block');		
							}	
						});
					}
				});
				menuitem.addClass("selected");
			}
		});
		
		/* PATH */
		try {
		$('path_'+pageID).addClass('selected');
		} catch (exception) {
			//No path
		}
		
		/* FONT SIZE */ 
		$$("font").each(function(tag,i){		
			if(tag.size.toInt()>0 && tag.size.toInt()<8)
			{
				tag.toggleClass('size'+tag.size);	
				tag.removeProperty('size');				
			}
			else
			{
				tag.toggleClass('size3');	
				tag.removeProperty('size');				
			}
		});

		/* NET-BLAST LOGIN */
			$('login').adopt(new Element('img', {
			    'styles': {
					'cursor':'pointer'
				},
				'events': {
					'mouseenter': function(){
						this.src = this.src.replace(/.gif/, "-over.gif");        		
					},
					'mouseleave': function(){
						this.src = this.src.replace(/-over.gif/, ".gif");	
					},
					'click': function(){
						window.open('../../login?idWebside='+pageID+'','teleport','width=50,height=50, resizable');
					}
				},
				'src': '../../images/nbLayoutMaster/_Rainbow/net-blast.gif',
				'title': 'Net-blast'
			}));

		/* SITEMAP */
		$('sitemap').addEvent('click',function() {
			document.location.href='index.html?id='+pageID+'&template=9Sitemap::Rainbow';
		});
		

		/* PRINT */
		$('print').addEvent('click',function(printformat) {
			window.open("index.html?id="+pageID+"&template=8Plain::Default","_blank","toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=no, width=570, height=580"); return false; },this);

		/* BANNER */
		$('banner').addEvent('click',function() {
//			location.href=homeURL;
			location.href='alias.html?id='+siteID;
		});
}

function InsertImage(imageID,imageDescription) {
	if(imageID!='')
		document.write('<img src="../../images/'+imageID+'" alt="'+imageDescription+'" />');
	else
		document.write('');
}