/*
	Basical stuff and functions

	Author : Gilles Coomans - gilles@exprom.net
*/
	var saveAndRestore = false;
	var lastNode = null;
	var lastContent = null;
	
    // change the HTML content of a DIV based on it's ID
    function setContent(id,content) {
		var d = document.getElementById(id);
		if( d != null ){
			if(saveAndRestore)
			{	// restore previous change and save this one
				if( lastNode != null)	lastNode.innerHTML = lastContent;
				lastNode = d;
				lastContent = d.innerHTML;
			}
			d.innerHTML = content;
		}
    }

     function linkTag(title,href) {
		return '<a href="'+href+'">'+title+'</a>';
    }
	function mailLink(ext, dom, usr){
			var adr = usr+"@"+dom+"."+ext;
			return linkTag(adr, "mai"+"lto:"+adr);	
	}
	
	function flashSequenceTag(src, pathXML, width, height, stillTime, transitionTime){
		var flashvars = "path="+pathXML +"&still="+stillTime+"&transition="+transitionTime+"&width="+400+"&height="+300;
		return 	flashTag(src, width, height, flashvars);
	}
	
	function flashTag(src, width, height, flashvars ){
		return '<object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\' width=\'' + width + '\' height=\'' + height + '\'>'
		+ ' <param name=\'flashVars\' value=\'' + flashvars + '\'>'
		+ ' <param name=\'src\' value=\'' + src + '\'>'
		+ ' <embed pluginspage=\'http://www.macromedia.com/go/getflashplayer\''
		+ ' width=\'' + width + '\' height=\'' + height + '\' flashVars=\'' + flashvars +'\''
		+ ' src=\'' + src + '\'/></object>';
	}
	

