

	
function qs() {
	
	var query = window.location.search.substring(1);
/* 	alert('q' + query); */
	var parms = query.split('&');
//	alert(parms.length);
	var bShowDefault = true;
	
	if (parms.length > 0) {
		for (var i=0; i<parms.length; i++) {
	//		alert(parms[i]);
		   var pos = parms[i].indexOf('=');
		   
		   if (pos > 0) {
			  var key = parms[i].substring(0,pos);
			  var val = parms[i].substring(pos+1);
	//	      alert('key: '+key + ' val: ' + val);
			  qsParm[key] = val;
			  
			   switch (key) {
				 
					case 'devPartA':
						if (val.length > 0) {
				   		alert('KEY: ' + key);
				   		alert('/Development/getDevStory.php5?'+key+'='+val,wtd_story,null,'GET',null,null,'story');
				   		var df = new net.ContentLoader('/Development/getDevStory.php5?'+key+'='+val,loadPlaceholderA,null,'GET',null,null,'mainSecondaryPlaceholderA');
					   	bShowDefault = false;
					   	}
					   	break;
					case 'devPartB':
						if (val.length > 0) {
				   		alert('KEY: ' + key);
				   		alert('/Development/getDevStory.php5?'+key+'='+val,wtd_story,null,'GET',null,null,'story');
				   		var df = new net.ContentLoader('/Development/getDevStory.php5?'+key+'='+val,loadPlaceholderB,null,'GET',null,null,'mainSecondaryPlaceholderB');
					   	bShowDefault = false;
					   	}
					   	break;		
					case 'devPartC':
						if (val.length > 0) {
				   		alert('KEY: ' + key);
				   		alert('/Development/getDevStory.php5?'+key+'='+val,wtd_story,null,'GET',null,null,'story');
				   		var df = new net.ContentLoader('/Development/getDevStory.php5?'+key+'='+val,loadPlaceholderB,null,'GET',null,null,'secondaryContent');
					   	bShowDefault = false;
					   	}
					   	break;
					 default:
					 
			   	alert('switch'+key);
			   	break;
					  
			   }
			   
			
			 }
		   }



	   
	   }
	   if (parms.length > 0 && bShowDefault)	{  // go about matching the new way, sans queryString - faux directory style
	 	
			var u = window.location;
	
	
			var regex = new RegExp("(World\/?)((pg|ws|nv)(\/?)([0-9]+)(\/?))");  // check to match mod_rewrite in .htaccess
			var match = regex.exec(u);
			if (match == null) {
	//			alert("No match");  // will let default through
			} else {
				var string = "matched at position " + match.index + ":\n";
				string = string + "string matched: " + match[0] + "\n";
				if (match.length > 0) {
					for (var i = 1; i < match.length; i++) {
						string = string + match[i] + "\n";
					}
					
					var ltype = match[3];
					var id = match[5];
	//				alert('itype id ' + ltype + ' ' +id);
					if (ltype.length == 2 && id.length > 0) {
	//					alert('/Development/getDevStory.php5?'+ltype+'_id='+id,wtd_story,null,'GET',null,null,'story');
					var df = new net.ContentLoader('/Development/getDevStory.php5?'+ltype+'_id='+id,wtd_story,null,'GET',null,null,'story');				  
					bShowDefault = false;
					}
				}
			}
	  	} // end else

	   
	   if (bShowDefault) {
	   		var txt = 2;
	   		var df = new net.ContentLoader('/Development/getDevStory.php5?nv_id='+txt,wtd_story,null,'GET',null,null,'secondaryContent');
	 	}
		
	}  // end function


	   /*  */
/* 	 */
/* function showPhA(x) { */
/* 	var df = new net.ContentLoader('/Development/getDevStory.php5?devPartA='+x,loadPlaceholderA	,null,'GET',null,null,null);	 */
/* } */
/*  */
/* function showPhB(x) { */
/* 	var df = new net.ContentLoader('/Development/getDevStory.php5?devPartB='+x,loadPlaceholderB	,null,'GET',null,null,null);	 */
/* } */

function showPhC(x) {
	var df = new net.ContentLoader('/Development/getDevStory.php5?devPartC='+x,loadPlaceholderC	,null,'GET',null,null,null);	
}

/*  */
/* function loadPlaceholderA() {  */
/* 	document.getElementById('mainSecondaryPlaceholderA').innerHTML = this.req.responseText;    */
/* } */
/*  */
/* function loadPlaceholderB() {  */
/* 	document.getElementById('mainSecondaryPlaceholderB').innerHTML = this.req.responseText;    */
/* } */
function loadPlaceholderC() { 
	document.getElementById('secondaryContent').innerHTML = this.req.responseText;   
}
