//Global status tracker object
//	allows for useage: 
//		status.lookup(playerName)
//		status.add(playerName)
//		status.get(prof#,playerName)
//		status.set(prof#,playerName,status)
function statusObject(){
	var statusList = new Array();
	var prof1 = new Array();
	var prof2 = new Array();
	
	//Lookup function to see if player exists in our status
	this.lookup = function(playerName){
		return searchArray(statusList,playerName);
	}
	
	//Adds the given player to the status list
	this.add = function(playerName){
		statusList.push(playerName);
	}
	
	//Gets a current players status for any given profession
	this.get = function(prof,playerName){
		switch(prof){
    		case "1":
				 if(typeof prof1[playerName] == "undefined"){
				 	return "0";
				 }
    			 return prof1[playerName];
    			 break;
    		case "2":
				  if(typeof prof2[playerName] == "undefined"){
				 	return "0";
				 }
    			 return prof2[playerName];
    			 break;
		}
	}
	
	//Sets a players profession status to open or closed
	this.set = function(prof,playerName,status){
		switch(prof){
    		case "1":
				 prof1[playerName] = status;
				 break;
			case "2":
				 prof2[playerName] = status;
				 break;
		}		 
	}//this.set	
}//status();
 
 
function theOther(id){
  switch(id){
  	case "1":
		return "2";
		break;
	case "2":
		return "1";
		break;
   }
}