

function getSubString(){
	
	
var q_str = new String(document.location.search);
	var t_hash = String(document.location.hash) ;
	
	if( t_hash == null ) {
		t_hash = "" ;
	}

    if( q_str != null || q_str == "" ) {
		if( parent != null ) {
			var parent_query_string = "" ;
			parent_query_string = document.location.search ;
			if( parent_query_string != null ) {
				q_str = parent_query_string ;
			}
		}
	}
	
	if( q_str && q_str != null && q_str != "" ) {
		if( q_str.indexOf(";") > -1 ) {
			var temp_q_str = q_str ;
			q_str = temp_q_str.substring( 0, q_str.indexOf(";") );
		}
		
		// remove the question mark
		q_str = q_str.substring( 1 );
	}
	else {
		q_str = "";
	}
	
	if( (t_hash != null && t_hash != "") && (q_str==null || q_str == "" || q_str == "null")  ) {
		q_str = t_hash ;
	}
//alert( "direct link" + q_str );

	return q_str;

	

}


