	/* call js function */
	function addJavascript(jsname,pos) {
		var th = document.getElementsByTagName(pos)[0];
		var s = document.createElement('script');
		s.setAttribute('type','text/javascript');
		s.setAttribute('src',jsname);
		th.appendChild(s);
	}
	
	function keys(){
		/* get url key */
		var key = window.location.href.split(':');
		url_key = key[0];
	
		/* get url sections */
		var sections = window.location.href.split('/');
		section_key = sections[3];
	
		/* get url subdomain */
		var subdomain = sections[2].split('.');
		subdomain_key = subdomain[0];
		
		var domain = window.location.hostname;
		domain_key = domain.replace(subdomain_key+".secretdreamer", "");
		
		//document.write("<br /><br />" + domain_key);
	}	
	
	//call keys function
	keys();
	
	var domain = window.location.hostname;
	domain_key = domain.replace(subdomain_key+".secretdreamer", "");
	
	/* call all js files */
	//addJavascript('newExternal.js','body');
	AC_FL_RunContent = 0;
	addJavascript(url_key+'://'+subdomain_key+'.secretdreamer'+domain_key+'/js/AC_RunActiveContent.js','head');
	addJavascript(url_key+'://'+subdomain_key+'.secretdreamer'+domain_key+'/js/jquery.js','head');
	addJavascript(url_key+'://'+subdomain_key+'.secretdreamer'+domain_key+'/js/prototype.js','head');
	addJavascript(url_key+'://'+subdomain_key+'.secretdreamer'+domain_key+'/js/ajax.js','head');

	//limit google analytics
	var selectionSkipArray = ['user'];
	var subdomainSkipArray = ['sandbox'];
	var limit = 0;

	for (x in selectionSkipArray){
		if(selectionSkipArray[x] == section_key) { 
			limit++;
		}
	}

	for (x in subdomainSkipArray){
		if(subdomainSkipArray[x] == subdomain_key) { 
			limit++;
		}
	}

	if(limit < 1){

		addJavascript(url_key+'://highlighted-word-tracker.googlecode.com/svn/trunk/async.min.js','head');
		
		/* Google Analytics */
		var _gaq = _gaq || [];
		_gaq.push(['_setAccount', 'UA-1934886-1']);
		_gaq.push(['_trackPageview']);

		(function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		})();
	}
	
	/* Bookmarks Modified to support Opera */
	function bookmarksite(title,url){
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, "");
	else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	else if(document.all)// ie
		window.external.AddFavorite(url, title);
	}
	
	function rater(newClass,val){

		document.getElementById('starRate').className = newClass;
		document.getElementById('rating').value = val;
	}
	
	function toggle_off( targetId ){
		if (document.getElementById) {
			target = document.getElementById (targetId);
			target.style.display = "none";
		}
	}
