var adArray = new Object;	
	
	// -----------------------------------------------------------
	function buildAds(ad_positions, ad_keywords) {
		var adArray = new Object;		
		var pos_list = ad_positions.split('|');
		var key_list = ad_keywords.split('|');
		
		for (i=0; i<pos_list.length; i++) {
			adArray[pos_list[i]] = key_list[i];
			}	
                return adArray;
		}
	


	// -----------------------------------------------------------	
	/* ad_pos calls the particular ad spot for placement on the page.*/
	function ad_pos(target) {

		if (!document.phpAds_used) document.phpAds_used = ',';
		phpAds_random = new String (Math.random()); 
                phpAds_random = phpAds_random.substring(2,11);
		document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   		try {
                   document.write ("http://" + ads_servername + "/adjs.php?n=" + phpAds_random);
                } catch (e) {
		   document.write ("http://ads.milliman.com/adjs.php?n=" + phpAds_random);
		   }
   			
        document.write("&amp;what=" + adArray[target]); 
		//document.write("&amp;exclude=" + document.phpAds_used);
			
   		if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));

   		document.write ("'><" + "/script>");
		
   		}	
			
		
	// -----------------------------------------------------------
	function CreateQuery(search)
	{
		var q      = "q=" + search.q.value;
		var site   = "site=default_collection";
		var client = "client=default_frontend";
		var pss    = "proxystylesheet=default_frontend";
		var output = "output=xml_no_dtd";
	  
		// Build URL with query String
		var URL = "http://search.milliman.com/search";
		URL = URL + "?" + q + "&" + site + "&" + client + "&" + pss + "&" + output;
		
	        
	        location.href = URL;
	}