var xmlHttp
var tmpTarget

var iCount
iCount=0;

// BEHÖVS DE GLOBALA VARIABLERNA DÅ DE FÖR DE MESTA SKICKAS VIA URL:N?

var arrPoints=new Array();

var arrPointsPosition=new Array();

var myPaintPointsValue=new Array();

var myPaintPointsValue_medb=new Array();

function hideInfo(){
	document.getElementById("infoMess").innerHTML="";
}


function test(){
//alert("ola")	
}


function clickedValueTEST(zonID,gender,posCHAMP){
	//alert("zonID " + zonID)
	// Gets the current x and y coordinates of the clicked position
	//var xpos = document.ShowPos.MouseX.value;
	//var ypos = document.ShowPos.MouseY.value;
	
	var xpos = 40;
	var ypos = 40;
	
	// Call and create DIV and show painpoint and get the correct id for the visual id back
	var painpointID = creatediv(xpos,ypos,zonID); 
	
	// Setting graphic painpoint
	document.getElementById(painpointID).innerHTML="<img src='http://www.champ.se/images/painFlag_anim.gif' border=0 onclick='javascript:delPainPoint('" & painpointID & "')'>"
	
	//alert("painpointID " + painpointID)
}



// --------------------------------------------------------------------
// Funktion for handling the event when user clicks on a specific area
// --------------------------------------------------------------------
function clickedValue(zonID,gender,posCHAMP){
	
	//alert("zonID " + zonID)
	
	// Gets the current x and y coordinates of the clicked position
	var xpos = document.ShowPos.MouseX.value;
	var ypos = document.ShowPos.MouseY.value;
	
	
//	alert("xpos " + xpos);
//	alert("ypos " + ypos);
//	alert("zonID " + zonID);
	
	// Call and create DIV and show painpoint and get the correct id for the visual id back
	var painpointID = creatediv(xpos,ypos,zonID); 
	
	// Setting graphic painpoint
	document.getElementById(painpointID).innerHTML="<img src='http://www.champ.se/images/painFlag_anim.gif'>"
	
	// Put the connected Value to each clicked id into an array
	//myPaintPointsValue[iCount]=returnZonContent(zonID);
	
	myPaintPointsValue.push(returnZonContent(zonID)); 
	

	//alert("ZonContent " + returnZonContent(zonID))
	
	//myPaintPointsValue_medb[iCount]=returnZonContent_medb(zonID);
	myPaintPointsValue_medb.push(returnZonContent_medb(zonID)); 
	
	//alert("ZonContent_medb " + returnZonContent_medb(zonID)) //<----------------------------------------------------------------------------!! FORTSÄTT HÄRIFRÅN !!

	// Putting all the clicked id's into an array
	// Save the id's into an array for use in function rotateChamp(tmpBtn)
	arrPoints.push(zonID); 

	
	// Save the id's x and y cord into an array for use in displaying paintpoint after rotation

		// Fetch coordinates for the current area clicked on the imagemap

		var FetchCord = new Array(); //<----------------------------------------------------------------------------!! NYTT
		
		if (gender=='m'){
		
		FetchCord = returnZonCords_Male(posCHAMP,zonID).split(",");
		
		}
		
		if (gender=='f'){
		
		FetchCord = returnZonCords_Female(posCHAMP,zonID).split(",");
		
		}
		
		var loopLength = FetchCord.length;
		var xORy
		xORy=1 // starts with x-value
		var xSmall=10000
		var xBig=0
		var ySmall=10000
		var yBig=0
		
		for (var i=0;i<loopLength;i++){
			// Retrive X-cord, small and big
			//alert(xORy)
			if (xORy==1){
				if (parseFloat(FetchCord[i])<=parseFloat(xSmall)){
					xSmall=FetchCord[i]
				}
				if (parseFloat(FetchCord[i])>parseFloat(xBig)){
					xBig=FetchCord[i]
				}
				xORy=2
			}
			else
			// Retrive Y-cord
			{
			if (parseFloat(FetchCord[i])<parseFloat(ySmall)){
					ySmall=FetchCord[i]
				}
				if (parseFloat(FetchCord[i])>parseFloat(yBig)){
					yBig=FetchCord[i]
				} 
				xORy=1
			}
		}

		// Calculate the location inside the img map area in percent
		
		var xlength = xBig-xSmall;
		
		var xPercPos = (parseFloat(xpos)-20); // Correct clicked position
		
		xPercPos = xPercPos-xSmall; // Calculate how fare from left corner of the clicked area
		
		xPercPos = (xPercPos/xlength)*100; 
		
		xPercPos = xPercPos.toFixed(0); // Round of digits
		
		
		var ylength = yBig-ySmall;
		
		var yPercPos = (parseFloat(ypos)-20); // Correct clicked position
		
		yPercPos = yPercPos-ySmall; // Calculate how fare from left corner of the clicked area
		
		yPercPos = (yPercPos/ylength)*100; 
		
		yPercPos = yPercPos.toFixed(0); // Round of digits
		
		// Removes Minus
		
		if (xPercPos<0){xPercPos=xPercPos*-1}
		if (yPercPos<0){yPercPos=yPercPos*-1}
		

		// Adding to array over percent values

		var posString = xPercPos + "_" + yPercPos;
		
		arrPointsPosition.push(posString); 


	//Add 1 to iCount
	iCount++;        
		
	//ZOOM CHAMP <-------------------------------------------- For later use regarding tight zonareas as face and neck
	//if (document.body.style.cursor == "crosshair"){

	//document.location.href="zoomCHAMP.asp" // Default inläsning
	//}	

}

// --------------------------------------------------------------------
// Funktion for creating a DIV
// --------------------------------------------------------------------
//function creatediv_GA(xpos,ypos,zonID){
//	
//
//	
//	var newdiv = document.createElement('div');
//	
//   	newdiv.style.width =50  + 'px';  //OBS! SAFARI VILL HA pos med px och i strängformat! OLD VALUE:13
//   
//   	newdiv.style.height = 50  + 'px';  //OBS! SAFARI VILL HA pos med px och i strängformat! OLD VALUE:13
//   
//   	newdiv.style.position = "absolute";
//          
//	newdiv.style.left = (xpos -25) + 'px';   //OBS! SAFARI VILL HA pos med px och i strängformat! OLD VALUE:7
//
//	newdiv.style.top = (ypos -25) + 'px';   //OBS! SAFARI VILL HA pos med px och i strängformat! OLD VALUE:7
//	
//   
//	//newdiv.style.backgroundImage="url('images/painSpot.png')";
//	
//	//newdiv.style.backgroundColor="#000FF";
//	
//	newdiv.style.backgroundImage="url('images/painFlag_anim.gif')";
//	
//	newdiv.style.color="#ff00ff";
//	
//	newdiv.style.opacity = (0.5);
//	
//    newdiv.style.filter  = "alpha(opacity=" + 50 + ")";
//	
//	newdiv.style.cursor="pointer";
//	
//	newdiv.onclick="javascript:delPainPoint(this.id)" // Assigning action 
//	
//	var painpointID = zonID + 'painPos' + xpos + ypos // Creating painpointID
//	
//	newdiv.onclick = function() {delPainPoint(painpointID)} ;  // Assigning function
//
//	newdiv.setAttribute('id', painpointID) // Assigning painpointID
//	
//	alert("test4: xpos" + xpos + " yos; " + ypos + " zonid: " + zonID + " painpointID:" + painpointID);
//	
//	//document.getElementById(painpointID).innerHTML="Test5"
//	
//	document.body.appendChild(newdiv) // Assigning DIV
//	
//	return painpointID

//}
	

function creatediv(xpos,ypos,zonID){
	
	var newdiv = document.createElement('div');
	
   	newdiv.style.width =50  + 'px';  //OBS! SAFARI VILL HA pos med px och i strängformat! OLD VALUE:13
   
   	newdiv.style.height = 50  + 'px';  //OBS! SAFARI VILL HA pos med px och i strängformat! OLD VALUE:13
   
   	newdiv.style.position = "absolute";
          
	newdiv.style.left = (xpos -25) + 'px';   //OBS! SAFARI VILL HA pos med px och i strängformat! OLD VALUE:7

	newdiv.style.top = (ypos -25) + 'px';   //OBS! SAFARI VILL HA pos med px och i strängformat! OLD VALUE:7
   
	//newdiv.style.backgroundImage="url('images/painSpot.png')";
	
	//newdiv.style.backgroundColor="#00ff00";
	
//	newdiv.style.backgroundImage='url("http://www.champ.se/images/painFlag_anim.gif")';
	
	//newdiv.style.opacity = (0.5);
	
    //newdiv.style.filter  = "alpha(opacity=" + 50 + ")";
	
	newdiv.style.cursor="pointer";
	
	newdiv.onclick="javascript:delPainPoint(this.id)" // Assigning action 
	
	var painpointID = zonID + 'painPos' + xpos + ypos // Creating painpointID
	
	newdiv.onclick = function() {delPainPoint(painpointID)} ;  // Assigning function

	newdiv.setAttribute('id', painpointID) // Assigning painpointID
	
	document.body.appendChild(newdiv) // Assigning DIV
	
	return painpointID
	
}


function showMyAccountCG(gender,email){
	var url="http://www.champ.se/champMyAccount.asp?show=CG&gender=" + gender + "&email=" + email;
	window.location.href=url;
}

function showMyAccountLogg(gender,email){
	var url="http://www.champ.se/champMyAccount.asp?show=Logg&gender=" + gender + "&email=" + email;
	window.location.href=url;
}


function OpenDetail(gender,email,UserDataID){
	var url="http://www.champ.se/champMyAccountDetail.asp?gender=" + gender + "&email=" + email + "&UserDataID=" + UserDataID;
	window.location.href=url;
}


function colorThisIn(btnID){
	document.getElementById(btnID).style.backgroundColor="#CCC";
}

function colorThisOut(btnID){
	document.getElementById(btnID).style.backgroundColor="#EEE";
}

function MyAccount(gender,email){
	var url="http://www.champ.se/champMyAccount.asp?gender=" + gender + "&email=" + email;
	window.location.href=url;
	}
	
function goSave(resultMGN,resultMGN_standAlone,gender,email){
	var txtPainOrigin1 = document.getElementById("txtPainOrigin1").value;
	var txtPainOrigin2 = document.getElementById("txtPainOrigin2").value;
	url="champSave.asp?resultMGN=" + resultMGN + "&resultMGN_standAlone=" + resultMGN_standAlone + "&gender=" + gender + "&email=" + email + "&txtPainOrigin1=" + txtPainOrigin1 + "&txtPainOrigin2=" + txtPainOrigin2;
	window.location.href=url;
}


function goMyInfo(posCHAMP,gender,mob,mw,email){
	var url="http://www.champ.se/champMyAccount.asp?posCHAMP=" + posCHAMP + "&gender=" + gender + "&mob=" + mob + "&mw=" + mw + "&email=" + email;
	window.location.href=url;
}

function genCode(comCode){  
	
	tmpTarget = "comCodeHolder";

	var url="http://www.champ.se/comCode.asp?comCode=" + comCode;
	url=url+"&sid="+Math.random()

	var xmlhttp=false;
	/* running locally on IE5.5, IE6, IE7 */ ; /*@cc_on
	if(location.protocol=="file:"){
	if(!xmlhttp)try{ xmlhttp=new ActiveXObject("MSXML2.XMLHTTP"); }catch(e){xmlhttp=false;}
	if(!xmlhttp)try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){xmlhttp=false;}
	} ; @cc_off @*/
	/* IE7, Firefox, Safari, Opera... */
	if(!xmlhttp)try{ xmlhttp=new XMLHttpRequest(); }catch(e){xmlhttp=false;}
	/* IE6 */
	if(typeof ActiveXObject != "undefined"){
	if(!xmlhttp)try{ xmlhttp=new ActiveXObject("MSXML2.XMLHTTP"); }catch(e){xmlhttp=false;}
	if(!xmlhttp)try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){xmlhttp=false;}
	}
	/* IceBrowser */
	if(!xmlhttp)try{ xmlhttp=createRequest(); }catch(e){xmlhttp=false;}


	if(!xmlhttp)return alert("Your browser doesn't seem to support XMLHttpRequests.");
	xmlhttp.open("GET",url,true);//make sure open appears before onreadystatechange lest IE will encounter issues beyond the first request
	xmlhttp.onreadystatechange=function(){
	if(xmlhttp.readyState!=4)return;
	if(!xmlhttp.status||xmlhttp.status==200)
		document.getElementById(tmpTarget).innerHTML=xmlhttp.responseText;
	else
		alert("Request failed!");
	};//onreadystatechange
	xmlhttp.send(null);
}


function demoResult(txtSearchCity){  
	tmpTarget = "SearchContainer";
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url="champSearch.asp?txtSearchCity=" + txtSearchCity;
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=updatedTarget 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}




function clearThis(id){
	document.getElementById(id).value="";	
}


function closeWelcome(email){
	if (email=='noname'){
	document.getElementById("welcomePlate").innerHTML="";
	url="champ_fm.asp?posCHAMP=1&gender=f&startFlag=false&email=noname";
	window.location.href=url;
	}
	else
	{
	document.getElementById("welcomePlate").innerHTML="";
	url="champ_fm.asp?posCHAMP=1&gender=f&startFlag=false&email=" + email;
	window.location.href=url;	
	}
}

function goAdmin(){
	tmpTarget = "champContainer";
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url="admCoop.asp?coop=1"
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=updatedTarget 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function goCHAMPcoop(){
	document.getElementById("champContainer").innerHTML="<IFRAME id=champmodule height=960px src='http://www.champlab.se/champ.asp?posCHAMP=1&coop=1' frameBorder=0 width=485px name=http://www.champlab.se/champmodule scrolling=no></IFRAME>"

}


	


// --------------------------------------------------------------------
// Rotate CHAMP - MALE
// --------------------------------------------------------------------
function rotateChamp(posCHAMP,inContainerID,inPosID,gender,mob,mw,email){
	
	// Read in and send string of clicked zon id's.  <----------------------------------------??? ORDNING
	var  containerID = arrPoints;
	
	// Read in and send string of id's coordinates
	var posID = arrPointsPosition; //<----------------------------------------??? ORDNING
	
	// To fetch values send på Request.querystring <----------------------------------------??? ORDNING
	if (containerID=="") {
		containerID = inContainerID;
		posID = inPosID;
		}
		
	url="champ.asp?posCHAMP=" + posCHAMP + "&containerID=" + containerID + "&posID=" + posID + "&gender=" + gender + "&mob=" + mob + "&mw=" + mw + "&email=" + email;
	window.location.href = url;
}

// --------------------------------------------------------------------
// Rotate CHAMP - FEMALE
// --------------------------------------------------------------------
function rotateChamp_fm(posCHAMP,inContainerID,inPosID,gender,mob,mw,email){
	
	// Read in and send string of clicked zon id's.  <----------------------------------------??? ORDNING
	var  containerID = arrPoints;
	
	// Read in and send string of id's coordinates
	var posID = arrPointsPosition; //<----------------------------------------??? ORDNING
	
	// To fetch values send på Request.querystring <----------------------------------------??? ORDNING
	if (containerID=="") {
		containerID = inContainerID;
		posID = inPosID;
		}

	url="champ_fm.asp?posCHAMP=" + posCHAMP + "&containerID=" + containerID + "&posID=" + posID + "&gender=" + gender + "&mob=" + mob + "&mw=" + mw + "&email=" + email;

	window.location.href = url;
}

// --------------------------------------------------------------------
// Load values into the array myPaintPointsValue AFTER rotation
// --------------------------------------------------------------------
function getContainerID(posCHAMP,containerID,posID,gender,mob,mw){
	
	// If any clicked and transported values exists

	if(containerID){
		
		//Split string into array
		arrPoints = containerID.split(","); 

		// Get global value iCount up to speed
		iCount = arrPoints.length; 
		
		//Fetch zonvalues and populate myPaintPointsValue array
		for (var i=0;i<iCount;i++){
			
			//myPaintPointsValue[i]=returnZonContent(arrPoints[i]);
			myPaintPointsValue.push(returnZonContent(arrPoints[i])); 

			
			
			//myPaintPointsValue_medb[i]=returnZonContent_medb(arrPoints[i]);
			myPaintPointsValue_medb.push(returnZonContent_medb(arrPoints[i])); 
		}
		
	}
	
	
	// If any clicked and transported posdata exists, fetch it and paint it
	
	if(posID){
		
		//Split string into array
		
		arrPointsPosition = posID.split(","); 
		 
		// Get NUMBER OF points to loop thru
		
		var loopLength = arrPointsPosition.length;
			
		for (var i=0;i<loopLength;i++){
			
			// Get value for position and split inte posts for separate reading
			
			var tmpPosString = new Array();
			tmpPosString = arrPointsPosition[i].split("_");
			
			var xpos = tmpPosString[0]; 
			var ypos = tmpPosString[1]; 
			
			// Fetch coordinates for the current area clicked on the imagemap
			
			var FetchCord = new Array(); 
			
			if (gender=='m'){
			
			FetchCord = returnZonCords_Male(posCHAMP,arrPoints[i]); 
			
			}
			
			if (gender=='f'){
			
			FetchCord = returnZonCords_Female(posCHAMP,arrPoints[i]); 
			
			}
			
			
			// Avoiding trying to paint areas not present (hidden)
			
			if(typeof(FetchCord)!="undefined"){ 
		
				FetchCord = FetchCord.split(",");
			
				// Retrive areas corner values
				
				var loopX = FetchCord.length;
				var xORy
				xORy=1 // starts with x-value
				var xSmall=10000
				var xBig=0
				var ySmall=10000
				var yBig=0
				
				// Retrive X-cord, small and big
				
				for (var x=0;x<loopX;x++){
					
						
					if (xORy==1){
						if (parseFloat(FetchCord[x])<=parseFloat(xSmall)){
							xSmall=FetchCord[x]
						}
						if (parseFloat(FetchCord[x])>parseFloat(xBig)){
							xBig=FetchCord[x]
						}
						xORy=2
					}
					else
					// Retrive Y-cord
					{
						if (parseFloat(FetchCord[x])<parseFloat(ySmall)){
							ySmall=FetchCord[x]
						}
						if (parseFloat(FetchCord[x])>parseFloat(yBig)){
							yBig=FetchCord[x]
						} 
						xORy=1
					}
					
					
				}
	
	
				// Calculate the location inside the img map area according to percent
				
				var xlength = xBig-xSmall;
				
				var ylength = yBig-ySmall;
				
				xpos = parseFloat(xlength) * (parseFloat(xpos)/100);
				
				xpos = parseFloat(xpos) + parseFloat(xSmall)
				
				xpos = xpos.toFixed(0); // Round of digits
				
				
				ypos = parseFloat(ylength) * (parseFloat(ypos)/100);
				
				ypos = parseFloat(ypos) + parseFloat(ySmall)
				
				ypos = ypos.toFixed(0); // Round of digits
				
				xpos=parseFloat(xpos)+20
				
				ypos=parseFloat(ypos)+20
				
				//Adjust location
		
				var tmpTargetDIV = arrPoints[i]
		
				// Call and create DIV and show painpoint and get the correct id for the visual id back
				
				var painpointID = creatediv(xpos,ypos,tmpTargetDIV); 
				
				// Setting graphic painpoint
				document.getElementById(painpointID).innerHTML="<img src='http://www.champ.se/images/painFlag_anim.gif'>"
					
				var tmpWidth = document.getElementById(tmpTargetDIV).style.width;
				
			} // enf check 'undefined' 
			
		} // end for-next-loop
		
	} // end if(posID)
	
}


function removeByValue(arr, val) {     
	for(var i=0; i<arr.length; i++) {         
		if(arr[i] == val) {             
			arr.splice(i, 1);             
			break;         
		}     
	} 
} 





function delPainPoint(ppID){
	
	// Remove painPos
	var tmpStop = ppID.indexOf("painPos")

	// Extract zonID
	var tmpZonID = Left(ppID, tmpStop)
	
	//Extract painPos //
//	var tmpLength= ppID.length;
//	tmpLength = tmpLength-tmpStop
//	var tmpPainPos = Mid(ppID, tmpStop, tmpLength)
	
	for (var i=0; i < arrPoints.length; i++) {
		if (tmpZonID==arrPoints[i]){
			var elementPos=i;
			}
	}
	
	//alert("tmpZonID" + tmpZonID)
//	alert("elementPos" + elementPos)
//	alert("arrPoints" + arrPoints)
//	alert("arrPointsPosition" + arrPointsPosition)
  //alert("myPaintPointsValue " + myPaintPointsValue)
	
	// Remove element from arrays
	arrPoints.splice(elementPos, 1);
	arrPointsPosition.splice(elementPos, 1);
	myPaintPointsValue.splice(elementPos, 1);
	myPaintPointsValue_medb.splice(elementPos, 1);
	
//	alert("arrPoints" + arrPoints)
//	alert("arrPointsPosition" + arrPointsPosition)
  //alert("myPaintPointsValue " + myPaintPointsValue)
	
	
	// Delete the graphical point
	var delDiv = document.getElementById(ppID);  
	document.body.removeChild(delDiv)
	
}


function goMale(posCHAMP,gender,mob,mw,email){
	
	if (posCHAMP=="") {
		posCHAMP=1
	}
	
	posID=arrPointsPosition;
	containerID = arrPoints;
	
	var url="champ.asp?posCHAMP=" + posCHAMP + "&containerID=" + containerID + "&posID=" + posID + "&gender=m" + "&mob=" + mob + "&mw=" + mw + "&email=" + email;
	window.location.href=url;
}

function goFemale(posCHAMP,gender,mob,mw,email){
	
	if (posCHAMP=="") {
		posCHAMP=1
	}
	
	posID=arrPointsPosition;
	containerID = arrPoints;
	
	var url="champ_fm.asp?posCHAMP=" + posCHAMP + "&containerID=" + containerID + "&posID=" + posID + "&gender=f" + "&mob=" + mob + "&mw=" + mw + "&email=" + email
	window.location.href=url;
}

function ReturnCordString(posCHAMP,zonID){
	
	var arrPos=new Array();
	
	//FRONT
	if (posCHAMP=='1'){
		arrPos[80]="218,616,222,621,225,625,227,628,227,632,226,634,223,634,222,634,222,628,221,625,217,621,217,619" 
		arrPos[78]="192,620,199,604,207,583,211,562,217,528,217,514,216,506,213,484,222,477,231,469,232,476,233,486,234,501,233,513,227,542,220,572,215,593,215,602,218,609,218,616,217,619,217,621,221,626,222,634,214,634,200,634,193,633,191,629" 
		arrPos[77]="195,474,196,482,193,500,192,513,192,521,194,530,196,563,194,587,192,599,192,603,192,610,192,619,199,604,206,584,211,562,215,534,217,525,217,511,215,495,213,484,208,484,203,483,199,479" 
		arrPos[79]="123,636,128,635,131,632,135,628,138,623,139,628,138,632,136,635,132,636" 
		arrPos[76]="108,636,113,633,117,628,121,620,123,609,124,601,121,587,116,566,106,524,106,508,110,477,113,478,117,478,126,474,132,469,138,462,137,471,138,481,141,499,143,514,142,525,139,534,137,539,134,565,134,587,135,603,137,614,138,622,136,627,132,632,128,635,121,636" 
		arrPos[75]="101,465,98,481,97,495,97,508,99,528,103,544,107,571,111,590,110,603,107,607,101,612,91,617,81,622,77,622,73,624,69,628,69,631,70,635,75,634,77,635,81,636,107,636,114,633,118,628,121,620,123,607,124,600,118,573,109,538,106,524,106,509,108,486,110,477,105,472" 
		arrPos[87]="41,298,45,298,49,300,49,308,44,323,41,330,39,339,36,346,34,347,34,345,36,333,34,332,32,339,30,345,28,347,27,348,35,312,39,302" 
		arrPos[86]="25,297,34,297,41,298,39,302,35,312,32,329,27,347,25,346,26,337,27,333,26,331,19,344,16,346,13,345,14,341,20,327,19,326,10,340,8,343,6,343,5,340,13,320,10,322,7,322,7,319,11,310,19,304,24,302" 
		arrPos[81]="25,296,21,299,16,302,13,305,11,309,21,303,24,302" 
		arrPos[85]="72,202,68,207,64,210,61,212,58,212,56,216,52,229,45,252,38,269,34,282,30,291,27,295,25,296,33,296,37,297,41,298,47,278,56,259,67,233,72,215,73,209" 
		arrPos[82]="95,166,86,175,81,177,77,178,77,184,75,190,73,196,72,201,73,210,72,214,67,231,55,262,46,282,41,298,46,298,49,300,50,295,57,278,69,257,78,240,84,230,89,217,94,207,99,201,95,191,95,183,95,175" 
		arrPos[81]="77,178,75,183,73,187,72,191,66,201,62,207,58,212,62,212,68,207,72,201,75,190,77,184" 
		arrPos[83]="113,151,103,158,96,166,95,180,95,191,99,200,104,188,109,176,110,164,112,156" 
		arrPos[84]="113,151,110,162,109,170,108,176,114,165,115,154" 
		arrPos[37]="87,124,84,134,83,142,82,152,82,156,84,164,79,171,77,178,82,177,85,175,96,165,103,158,114,151,113,146,115,138,116,124" 
		arrPos[94]="301,297,306,305,309,315,311,330,315,346,313,345,307,331,306,331,310,345,309,345,305,341,299,329,292,311,291,299,294,297" 
		arrPos[93]="314,295,310,295,301,297,306,306,310,318,312,332,315,346,317,344,317,340,313,332,314,331,325,345,328,345,329,343,322,327,323,326,330,339,333,343,337,342,327,318,331,321,334,321,331,309,323,305,316,301,314,298" 
		arrPos[88]="314,295,324,301,328,303,330,309,316,301,314,298" 
		arrPos[92]="271,200,270,211,271,215,278,239,290,269,296,282,300,297,310,295,313,295,307,280,297,253,288,221,284,211,279,211,274,206" 
		arrPos[89]="247,165,257,174,260,176,263,176,266,176,266,183,268,191,271,199,270,207,271,215,277,234,286,259,296,281,300,297,295,297,292,298,291,300,289,289,283,276,271,254,260,235,255,221,252,214,243,199,247,189,247,176" 
		arrPos[88]="266,176,270,186,271,191,278,202,284,211,280,210,276,207,271,199,267,187,266,180" 
		arrPos[90]="230,151,237,155,243,159,246,164,247,176,247,186,246,193,243,198,240,191,238,184,234,175,233,165,232,157" 
		arrPos[91]="229,150,228,155,230,163,234,174,233,164,232,158,231,153" 
		arrPos[40]="224,124,239,124,246,124,251,123,255,123,258,130,259,140,260,151,260,154,259,163,266,176,260,176,257,174,246,164,243,159,235,153,230,150,231,146,229,138,226,131" 
		arrPos[74]="225,259,221,269,218,289,218,310,220,336,222,367,222,389,224,398,225,410,229,417,229,407,232,389,233,368,234,343,232,320,230,306,231,291,228,272" 
		arrPos[73]="184,314,185,330,187,347,190,372,191,382,190,387,189,393,187,398,185,401,184,401,184,415,185,427,187,436,191,451,192,458,192,464,195,474,199,479,204,484,208,484,212,484,222,477,231,469,229,456,229,450,229,429,229,417,225,408,222,393,222,377,221,356,219,334,217,311,217,290,219,279,221,269,215,277,211,283,202,292,196,302,191,307" 
		arrPos[72]="172,322,174,332,175,349,178,364,181,377,183,386,184,401,185,401,189,394,191,384,190,371,187,343,186,333,184,314,177,319" 
		arrPos[71]="160,315,153,342,147,365,145,377,145,392,147,399,150,406,160,373,168,347,170,336,171,327,172,322" 
		arrPos[70]="122,270,126,277,132,284,138,290,141,292,145,301,151,306,159,315,154,339,148,361,145,376,144,388,145,395,147,402,150,406,145,421,143,433,139,455,138,462,132,470,123,476,117,478,111,478,107,474,104,469,102,465,104,454,104,443,105,432,104,422,107,414,108,403,110,384,112,348,118,317,123,301,124,288" 
		arrPos[69]="119,260,116,271,114,285,114,295,113,302,109,319,104,342,102,363,101,377,101,388,101,398,103,411,104,422,107,413,109,391,110,371,112,348,116,327,122,303,124,290,123,275" 
		arrPos[67]="141,293,151,298,158,301,166,302,172,303,172,322,159,315,151,306,145,301" 
		arrPos[68]="172,302,182,302,192,298,202,293,195,303,185,314,177,319,172,322" 
		arrPos[66]="172,290,185,286,198,280,210,269,224,259,221,269,212,283,202,293,186,301,176,302,172,303" 
		arrPos[65]="119,260,133,271,144,279,157,287,171,290,171,303,164,302,152,299,137,290,129,281,121,269" 
		arrPos[64]="172,267,185,266,200,264,211,263,224,259,208,271,196,281,184,286,172,290" 
		arrPos[63]="119,258,126,262,142,264,157,266,172,267,172,291,158,287,144,279,132,270,123,264,119,260" 
		arrPos[62]="172,253,187,253,199,251,210,250,221,249,224,253,225,259,210,263,195,264,181,266,172,267" 
		arrPos[61]="121,249,147,252,172,253,172,267,159,266,140,264,126,261,119,258,120,253" 
		arrPos[60]="172,241,189,241,200,240,212,238,221,237,222,243,221,249,192,252,183,253,172,253" 
		arrPos[59]="122,237,151,241,172,241,172,253,152,252,135,250,122,249,122,244" 
		arrPos[58]="172,227,182,228,191,227,204,226,213,226,219,223,221,237,195,241,187,241,172,241" 
		arrPos[57]="125,224,132,226,142,226,154,227,172,227,172,241,153,241,138,239,127,238,122,237,123,232" 
		arrPos[56]="172,215,185,214,195,213,205,212,214,211,219,208,218,216,218,220,219,223,213,225,204,226,194,226,181,228,172,227" 
		arrPos[55]="125,209,129,211,138,213,144,213,153,214,172,215,172,227,155,227,142,226,133,226,128,224,125,224,125,217" 
		arrPos[54]="172,201,193,200,204,200,211,199,218,198,222,197,219,208,215,211,209,212,202,213,187,214,172,215" 
		arrPos[53]="120,196,125,198,132,199,139,200,150,200,172,201,172,215,147,213,138,212,131,212,127,210,124,208" 
		arrPos[51]="172,187,172,201,188,201,200,200,212,199,219,198,222,197,225,189,225,179,220,182,211,184,200,186,186,187" 
		arrPos[50]="119,180,124,183,132,184,139,185,151,186,162,187,172,187,172,201,140,200,131,199,124,197,120,196,118,189" 
		arrPos[47]="172,172,204,172,211,170,217,168,221,165,225,160,225,171,224,179,219,182,211,184,201,185,185,187,172,187" 
		arrPos[46]="117,160,124,168,131,170,139,172,172,172,172,187,145,186,133,184,124,183,119,179,118,173,118,168" 
		arrPos[52]="225,179,225,188,227,182,229,177" 
		arrPos[48]="229,151,228,156,230,168,230,172,229,177,224,179,225,174,225,169,225,164,226,160" 
		arrPos[49]="115,178,118,188,119,179" 
		arrPos[45]="114,153,115,160,114,171,114,174,115,178,119,179,118,173,118,168,117,160" 
		arrPos[44]="172,155,172,172,193,172,205,172,214,169,222,165,227,159,227,154,230,151,214,153,193,154" 
		arrPos[43]="114,151,117,160,124,167,133,171,141,172,172,172,172,156,145,154,129,153" 
		arrPos[42]="172,142,172,155,200,154,212,153,220,152,229,150,230,146,230,144,228,138,199,142" 
		arrPos[41]="115,138,113,144,113,148,113,151,129,153,144,154,172,155,172,142,144,142,132,140" 
		arrPos[39]="172,124,172,142,197,142,207,140,229,137,223,124,195,123" 
		arrPos[38]="171,124,149,122,116,124,115,137,137,141,146,141,172,142" 
		arrPos[33]="211,104,219,101,228,101,232,102,236,107,246,112,252,116,255,123,240,124,223,124,221,116,217,111" 
		arrPos[36]="193,109,193,123,206,123,223,124,221,117,217,111,214,106,211,104,201,108" 
		arrPos[29]="116,124,128,107,132,103,122,101,116,101,111,103,106,106,99,110,93,114,89,120,87,124" 
		arrPos[32]="132,103,139,106,150,109,150,122,139,123,126,124,116,124,123,113,128,107" 
		arrPos[30]="132,104,134,102,137,93,128,98,118,99,116,100,126,102" 
		arrPos[31]="150,85,150,109,139,107,132,104,133,102,137,93" 
		arrPos[34]="206,93,215,98,221,99,227,100,220,101,211,104,208,102" 
		arrPos[35]="193,85,192,109,201,108,210,104,208,102,206,93" 
		arrPos[24]="193,68,190,87,188,95,183,102,178,109,172,113,172,124,183,123,193,123,193,109" 
		arrPos[19]="149,70,150,102,150,123,160,124,171,124,171,113,168,113,164,109,159,102,155,97,153,89" 
		arrPos[23]="164,95,168,97,171,98,172,113,167,112,165,109" 
		arrPos[20]="149,68,154,74,158,85,164,94,165,110,159,102,155,95,152,82" 
		arrPos[28]="172,98,174,98,178,94,178,103,177,110,172,113" 
		arrPos[25]="178,94,183,85,187,76,189,73,193,66,189,89,188,95,183,102,177,110,178,101" 
		arrPos[26]="179,79,184,75,190,71,185,80,181,90,178,93,178,86" 
		arrPos[21]="164,94,163,79,160,77,154,74,158,84,162,91" 
		arrPos[22]="163,79,167,80,171,80,171,98,169,98,164,95" 
		arrPos[27]="172,80,171,98,174,97,178,94,178,84,179,79" 
		arrPos[7]="146,46,145,39,143,38,141,40,140,43,141,50,142,55,144,59,146,61,148,61,147,52,144,51,142,50,142,46,144,45" 
		arrPos[9]="196,44,197,41,199,38,201,40,202,45,202,50,200,57,197,60,194,61,195,55,195,52,198,51,200,50,200,47,199,45,197,45" 
		arrPos[8]="146,48,145,45,142,45,141,47,142,50,145,52,147,52" 
		arrPos[10]="196,48,197,44,200,46,201,47,199,51,197,52,195,51" 
		arrPos[6]="172,64,171,81,179,79,185,75,191,71,193,66,197,38,198,31,197,23,196,17,193,12,193,30,192,38,191,51,190,59,188,62,184,63,176,64" 
		arrPos[5]="149,13,150,33,151,49,153,58,154,62,156,63,171,64,171,80,164,79,157,76,154,73,150,68,145,40,144,25,146,18" 
		arrPos[3]="149,13,151,28,152,40,152,42,157,43,160,47,163,53,167,57,171,58,171,63,164,64,157,63,154,62,152,53,150,36" 
		arrPos[12]="152,38,154,38,156,40,157,42,156,44,155,43,152,41" 
		arrPos[13]="154,38,156,38,162,39,162,40,159,40,156,41,155,40" 
		arrPos[18]="174,42,177,42,178,41,180,41,180,38,177,39,174,41" 
		arrPos[14]="168,42,165,39,162,39,162,40,163,41,165,42" 
		arrPos[17]="180,40,183,41,186,42,186,40,189,38,184,38,180,39" 
		arrPos[11]="162,44,162,42,157,42,156,43,157,44" 
		arrPos[15]="185,45,180,45,180,43,185,43" 
		arrPos[16]="190,38,188,38,185,40,185,44,188,42,190,41" 
		arrPos[4]="193,12,191,30,191,38,191,40,189,42,186,43,181,48,179,52,176,55,174,58,171,58,171,64,180,64,186,63,188,62,189,58,191,48,193,31" 
		arrPos[2]="171,1,175,1,179,1,182,3,186,5,190,8,193,12,192,24,190,38,184,38,180,39,176,40,174,42,174,42,177,42,179,41,181,40,184,41,185,42,183,43,180,43,180,45,184,44,181,48,179,52,175,57,172,58" 
		arrPos[1]="171,1,166,1,160,3,155,5,152,8,149,13,151,22,151,28,152,34,152,38,156,38,162,39,165,40,168,42,164,42,162,41,160,40,157,41,157,42,159,43,162,43,162,44,157,44,160,47,162,51,165,55,168,58,171,58" 
	return arrPos[zonID];
	}
	
	//LEFT
	if (posCHAMP=='2'){
		arrPos[96]="167,3,167,9,167,16,173,17,178,20,180,26,182,31,182,35,182,47,182,54,180,61,183,60,185,55,187,51,190,45,191,37,189,29,188,21,186,16,182,10,175,6,171,4" 
		arrPos[95]="167,16,173,17,177,19,179,22,181,28,182,34,182,49,182,56,180,69,175,69,175,56,176,46,176,35,174,32,171,30,167,29" 
		arrPos[9]="162,48,161,47,160,33,163,31,165,29,169,30,173,31,176,35,177,38,176,55,175,69,175,80,175,84,162,84,167,66,157,66,159,59,160,54,165,54,166,53,167,51,167,49,166,48,162,48" 
		arrPos[97]="181,65,181,61,182,61,184,61,183,65,181,65" 
		arrPos[98]="180,65,183,65,183,69,180,69,181,65" 
		arrPos[99]="175,69,183,69,182,73,175,73,175,69" 
		arrPos[100]="175,73,182,74,182,78,175,78" 
		arrPos[101]="175,78,182,78,184,84,176,84" 
		arrPos[4]="151,18,146,18,143,21,139,31,136,43,120,59,120,62,119,64,119,65,121,66,127,66,140,63,148,57,149,52,151,33" 
		arrPos[6]="151,17,150,32,150,46,149,54,148,57,144,61,138,64,127,66,121,66,119,68,121,70,122,71,121,75,121,80,122,82,125,82,136,81,151,75,155,70,160,55,162,48,161,46,161,32,163,31,165,29,167,29,167,16" 
		arrPos[10]="163,48,166,48,167,49,167,51,165,54,161,54,162,49" 
		arrPos[102]="126,82,141,80,152,75,149,78,140,84,138,85,132,83" 
		arrPos[26]="157,68,155,71,152,76,146,81,141,84,148,92,152,85,154,82,155,76" 
		arrPos[27]="141,84,138,85,140,91,145,96,148,92,144,88" 
		arrPos[25]="157,66,155,75,154,82,148,92,149,98,149,102,150,109,154,105,155,102,167,66" 
		arrPos[28]="148,92,145,96,146,98,146,100,147,102,148,105,148,111,150,110,149,98" 
		arrPos[19]="148,108,143,110,139,113,137,116,132,124,129,129,135,126,142,116,148,111" 
		arrPos[24]="162,85,155,102,153,106,150,110,148,112,143,116,135,126,146,122,155,109,163,95,168,85" 
		arrPos[35]="169,84,156,109,166,105,171,98,175,94,177,92,176,84" 
		arrPos[34]="166,105,173,97,177,92,180,102,173,104" 
		arrPos[36]="146,122,156,109,165,106,162,113,160,119" 
		arrPos[33]="160,119,163,112,166,105,180,102,184,115,171,117" 
		arrPos[103]="176,84,179,95,180,102,184,115,213,115,210,110,198,99,189,88,185,84" 
		arrPos[104]="184,116,213,115,215,120,217,126,198,127,193,126,188,123,185,119" 
		arrPos[38]="129,129,125,135,121,143,127,140,131,132,134,126" 
		arrPos[39]="135,126,147,122,160,119,158,126,157,131,141,136,127,141,132,132" 
		arrPos[40]="160,119,158,126,157,131,157,133,157,137,165,145,169,149,190,157,199,158,207,157,217,153,222,147,217,144,217,136,219,130,217,126,199,127,193,126,187,122,184,116" 
		arrPos[41]="121,143,117,150,116,155,116,158,117,158,122,158,122,152,124,146,127,141" 
		arrPos[42]="127,141,157,131,157,135,159,139,162,143,149,148,132,154,122,157,124,146" 
		arrPos[43]="116,158,116,166,116,167,117,173,119,173,121,158" 
		arrPos[44]="122,157,141,151,162,143,159,145,157,148,156,155,156,160,152,162,148,165,139,170,132,172,124,173,120,173" 
		arrPos[109]="162,143,158,145,156,150,155,154,155,160,177,152,167,149,164,146" 
		arrPos[46]="117,173,116,177,116,180,116,184,116,186,120,186,119,182,119,176,120,173" 
		arrPos[47]="120,173,132,173,136,172,141,169,149,165,152,163,156,160,157,167,158,173,158,175,136,182,120,187,119,180" 
		arrPos[50]="116,187,116,189,118,194,117,198,119,200,119,203,121,202,122,202,121,197,121,189,120,187" 
		arrPos[51]="120,186,138,181,158,175,160,181,162,185,164,188,166,189,149,194,134,198,122,202,121,195" 
		arrPos[48]="156,160,177,152,177,168,158,175,157,167" 
		arrPos[110]="178,168,177,152,183,155,191,157,194,163" 
		arrPos[52]="158,175,177,168,178,185,166,189,163,188,162,185,160,181" 
		arrPos[111]="177,168,194,163,203,179,178,185" 
		arrPos[112]="178,185,179,200,200,194,205,180,203,179" 
		arrPos[113]="179,201,180,215,196,212,198,204,198,198,201,194" 
		arrPos[114]="180,215,182,230,195,228,196,218,196,212" 
		arrPos[115]="182,230,182,245,194,242,194,233,195,228" 
		arrPos[54]="178,185,150,194,122,202,123,208,123,212,124,216,138,213,153,209,174,202,179,201" 
		arrPos[56]="124,217,127,230,150,224,180,215,179,201,149,210" 
		arrPos[53]="119,203,122,202,123,207,123,212,124,216,121,216,121,208" 
		arrPos[55]="121,217,122,220,123,222,123,224,125,230,127,230,124,217" 
		arrPos[57]="126,230,127,230,129,236,129,241,127,240,127,235" 
		arrPos[58]="127,230,180,215,181,230,165,234,148,237,136,239,129,240" 
		arrPos[59]="126,241,129,241,129,251,127,252,127,248,127,243" 
		arrPos[60]="129,241,148,237,165,234,182,230,182,245,169,247,150,249,141,251,129,252" 
		arrPos[61]="127,252,127,254,126,256,126,262,127,266,128,260,129,252" 
		arrPos[88]="191,157,198,158,205,158,212,155,217,153,219,160,224,168,232,180,239,187,246,191,250,193,252,196,253,198,248,220,244,243,239,261,236,277,232,290,230,287,224,284,220,283,220,280,217,279,217,273,216,270,212,268,215,265,220,263,225,260,227,255,232,239,232,227,232,215,231,209,228,204,226,200,222,197,217,195,212,189,205,180,198,169" 
		arrPos[92]="229,205,231,208,232,213,232,215,233,225,232,234,232,239,227,256,229,238,229,225,229,213" 
		arrPos[90]="222,147,217,153,219,160,224,169,230,176,233,181,241,188,246,191,250,192,248,186,241,175,232,163,226,153" 
		arrPos[89]="253,198,248,223,243,246,239,261,241,262,243,263,244,260,245,255,248,245,250,230,253,215,253,207" 
		arrPos[93]="212,269,210,272,208,278,206,284,207,285,211,285,214,282,217,279,217,273,216,270" 
		arrPos[93]="220,284,217,290,215,294,214,295,207,301,207,304,207,306,204,308,203,311,203,313,212,310,208,313,207,315,207,317,210,314,216,311,224,304,229,298,232,294,232,289,228,286,224,284" 
		arrPos[94]="207,317,208,318,216,313,220,310,223,308,221,311,220,313,223,316,229,307,233,299,236,295,239,284,241,275,244,263,239,261,236,275,233,288,232,293,230,295,226,301,220,308" 
		arrPos[62]="129,252,148,250,160,248,169,247,182,245,194,243,194,246,196,249,198,250,200,252,200,255,174,260,127,265,128,259" 
		arrPos[64]="127,266,171,260,129,280,127,272" 
		arrPos[66]="129,280,170,260,173,260,162,270,149,281,139,288,129,296,129,288" 
		arrPos[68]="129,296,129,303,132,308,133,312,137,316,141,318,143,318,149,281,138,289" 
		arrPos[116]="182,259,200,255,201,263,204,270,208,278,206,283,191,283" 
		arrPos[73]="149,281,163,270,160,286,157,308,155,336,155,361,157,402,159,418,162,435,163,443,165,444,165,459,163,466,160,470,157,471,149,472,148,466,148,461,146,455,144,442,143,434,142,418,139,400,139,388,138,378,139,352,141,328,143,318,146,302" 
		arrPos[194]="191,283,206,283,206,284,207,285,211,285,212,284,213,289,213,295,207,302,207,304,207,306,203,309,203,311,203,313,212,310,208,315,207,317,206,320,198,301" 
		arrPos[74]="163,270,173,260,182,259,191,283,206,321,203,355,201,378,198,392,193,409,189,423,186,432,184,436,182,441,175,444,165,445,163,443,162,434,158,409,155,368,155,334,157,304,160,285" 
		arrPos[118]="176,444,180,443,184,437,186,433,185,447,186,459,181,449" 
		arrPos[78]="165,444,173,444,175,444,182,450,184,455,186,459,189,467,189,478,186,488,185,509,184,538,185,553,187,598,188,603,188,608,186,612,181,614,170,618,157,620,141,622,136,623,133,624,129,627,127,630,127,632,119,632,113,632,109,631,107,625,117,623,140,615,157,608,165,601,166,585,163,564,157,533,153,514,153,494,150,477,149,471,157,471,159,470,163,466,165,461,165,453" 
		arrPos[80]="189,469,191,476,194,486,197,498,198,511,196,526,194,545,194,571,194,589,198,605,200,616,198,622,196,627,191,633,142,634,139,632,127,632,127,628,132,625,138,623,146,622,166,618,170,618,182,614,187,610,188,607,186,599,185,567,184,525,185,506,186,489" 
		arrPos[119]="200,617,202,624,202,628,201,631,198,633,191,633,196,626" 
		arrPos[70]="132,311,135,315,139,317,143,318,141,331,138,362,138,387,139,399,141,416,142,432,144,442,146,453,148,460,148,469,146,470,138,469,128,467,129,461,129,455,127,452,127,445,124,435,123,418,124,397,126,378,127,350,129,331,130,320" 
		arrPos[76]="128,467,136,469,143,470,147,470,148,469,150,477,152,493,153,505,154,519,155,526,158,541,160,553,157,566,154,581,153,593,155,608,141,615,116,623,123,613,127,604,129,595,129,580,129,564,129,542,128,508,129,485,129,474" 
		arrPos[75]="129,581,129,592,129,600,123,612,116,623,107,625,108,629,111,632,101,632,95,633,88,633,82,632,77,632,72,626,76,624,80,623,93,618,105,614,115,609,121,605,126,594" 
		arrPos[2]="167,2,158,2,149,4,139,7,133,11,129,15,126,18,124,29,121,37,122,42,115,54,115,57,116,59,120,59,130,49,127,49,127,46,131,45,126,40,133,41,134,40,136,40,139,31,141,24,146,18,152,16,167,16" 
		arrPos[17]="126,42,133,42,131,45" 
		arrPos[15]="128,47,127,49,130,49,130,46" 
		arrPos[16]="131,45,134,41,136,41,136,43,130,49"  
		return arrPos[zonID];
	}
	//RIGHT
	if (posCHAMP=='3'){
		arrPos[12]="193,39,195,39,198,43,198,47,194,43" 
		arrPos[11]="198,43,200,44,201,47,198,47,198,46" 
		arrPos[13]="196,39,202,39,198,42" 
		arrPos[1]="161,1,161,15,181,16,183,16,186,19,190,29,193,38,195,38,196,39,203,38,201,41,198,42,200,44,201,47,198,47,209,57,212,57,214,55,214,52,207,40,208,36,202,16,198,11,192,6,183,3,173,1" 
		arrPos[78]="200,580,199,588,200,599,203,607,213,621,220,623,220,626,216,630,233,630,241,628,245,629,250,628,255,624,255,622,247,620,238,617,230,613,218,609,210,605,205,598" 
		arrPos[77]="181,466,181,467,190,467,200,465,199,486,200,515,200,545,200,577,199,590,200,598,204,607,213,621,195,615,180,609,174,606,175,587,174,577,168,550,173,525,176,504,178,480" 
		arrPos[79]="128,613,126,619,126,624,127,629,130,630,138,630,132,624" 
		arrPos[188]="140,466,135,480,132,490,132,504,132,518,134,539,135,563,134,587,131,605,129,613,131,620,133,624,138,630,188,630,195,630,198,630,202,630,201,626,197,623,189,620,176,618,162,616,145,610,141,607,142,596,143,575,144,542,144,511,142,489,139,473" 
		arrPos[75]="153,443,147,448,143,457,140,466,139,473,142,485,144,505,144,529,144,555,142,580,142,597,141,600,141,606,144,610,152,613,162,616,186,619,188,620,192,621,198,624,201,627,201,629,210,630,216,630,220,626,221,623,204,618,181,609,172,605,165,599,162,587,165,569,167,550,173,526,175,512,176,495,178,480,181,469,171,469,166,465,165,460,165,448,165,443" 
		arrPos[73]="186,316,187,328,189,343,190,358,189,388,187,410,187,420,186,430,184,440,183,449,181,460,181,466,183,467,189,467,197,466,200,465,200,457,200,452,201,449,201,440,204,428,205,411,204,393,202,363,201,342,199,328,198,317,197,308,193,312" 
		arrPos[70]="166,268,173,275,179,279,181,294,185,316,188,334,190,362,190,385,188,406,186,415,187,426,186,434,184,440,183,448,182,454,181,460,181,468,171,469,167,465,165,460,164,458,165,443,166,439,169,420,171,399,173,372,173,340,173,313,170,292,169,281" 
		arrPos[187]="153,442,148,439,144,434,142,431,143,442,142,451,142,457,146,449,149,445" 
		arrPos[69]="147,256,155,257,161,263,166,268,169,286,172,310,173,340,173,375,170,409,169,419,167,434,165,443,164,443,158,443,153,442,149,441,144,435,143,430,138,413,134,400,130,385,126,362,124,340,123,317,128,306,137,282,142,267" 
		arrPos[193]="123,280,138,280,127,309,125,312,123,318,121,314,121,312,120,311,117,308,121,309,124,311,126,311,126,308,125,306,123,302,122,300,118,296,115,293,115,287,116,282,118,283,121,283" 
		arrPos[177]="129,253,138,254,147,256,144,265,138,280,123,280,121,275,126,263" 
		arrPos[67]="179,279,190,287,199,294,198,300,197,308,193,312,187,315,185,316,181,297" 
		arrPos[65]="155,257,158,257,171,264,186,271,200,279,200,294,187,284,174,275,165,267" 
		arrPos[63]="158,257,179,261,201,264,201,267,200,273,200,279,186,271,169,263" 
		arrPos[85]="100,202,101,211,101,217,100,236,101,250,98,240,97,233,96,218,98,207" 
		arrPos[82]="84,261,87,259,89,259,84,236,76,197,75,202,75,213,79,231,83,249" 
		arrPos[87]="89,259,94,278,96,288,98,292,101,298,106,303,114,309,121,313,121,315,119,314,112,311,104,305,107,308,108,311,106,313,105,312,96,297,93,294,90,283,90,277,84,262,87,259"  
		arrPos[86]="109,281,113,290,117,295,122,300,123,302,126,308,126,311,124,311,117,307,121,312,121,314,118,312,106,304,101,297,98,291,97,287,101,283,105,281" 
		arrPos[86]="116,266,119,271,121,277,123,281,121,282,117,282,115,279,112,277,111,272,112,268,113,267" 
		arrPos[81]="112,151,117,155,124,156,131,156,137,155,132,166,124,179,121,181,116,187,112,193,107,195,103,197,101,201,99,205,97,211,96,220,96,233,97,235,100,247,103,257,107,261,112,263,115,264,115,267,113,267,111,271,112,277,107,279,109,281,104,281,101,283,96,288,92,272,86,247,81,221,75,197,76,194,77,190,82,189,87,187,96,177,103,167,109,159" 
		arrPos[83]="106,146,112,151,108,160,102,169,96,177,88,186,82,190,78,190,82,180,89,171,99,159,102,151" 
		arrPos[62]="200,250,201,250,201,253,202,256,202,261,201,264,200,258" 
		arrPos[61]="135,240,133,246,131,247,129,250,129,253,147,256,164,258,184,262,201,264,200,259,200,250,167,246,148,243" 
		arrPos[60]="200,238,202,238,202,243,201,247,201,250,200,250" 
		arrPos[59]="148,228,166,232,186,236,200,238,200,250,188,248,168,246,153,244,147,242" 
		arrPos[145]="134,225,148,228,147,242,135,240,135,232" 
		arrPos[58]="201,228,203,228,201,230,201,234,202,238,200,238,200,232" 
		arrPos[57]="148,213,176,221,201,228,200,233,200,238,190,237,166,232,148,228" 
		arrPos[166]="132,210,148,213,148,228,134,225,133,216" 
		arrPos[56]="205,214,208,214,207,219,204,224,203,228,201,228,203,221" 
		arrPos[55]="149,199,173,206,191,211,204,214,201,228,173,219,148,213" 
		arrPos[163]="127,193,149,198,148,213,132,210,131,200" 
		arrPos[54]="207,200,210,201,208,205,208,208,208,214,204,214,206,207" 
		arrPos[53]="151,184,178,192,192,197,204,200,207,200,206,205,206,210,205,214,186,210,158,201,149,198" 
		arrPos[51]="208,185,213,185,213,187,211,189,210,191,210,197,210,201,207,199,207,193" 
		arrPos[50]="170,173,187,179,198,181,208,185,208,190,207,195,207,199,204,200,187,196,170,190,162,187,165,187,167,184,169,180" 
		arrPos[49]="151,166,170,173,169,179,167,184,165,186,164,187,150,183" 
		arrPos[160]="125,177,124,179,125,182,126,188,127,192,149,198,150,183,137,180" 
		arrPos[156]="134,161,130,168,125,177,137,180,150,183,151,174,151,166,142,164" 
		arrPos[152]="138,155,135,161,143,164,151,166,151,158,151,150,145,152" 
		arrPos[45]="152,150,163,155,172,158,172,164,170,170,170,173,151,166,151,158" 
		arrPos[46]="208,171,200,171,195,170,189,167,183,165,179,162,173,158,172,166,170,170,170,173,185,179,198,182,208,185,209,179" 
		arrPos[47]="208,170,209,176,209,179,208,184,213,184,213,181,213,178,212,175,211,170" 
		arrPos[44]="207,155,210,155,213,156,213,159,213,164,212,166,211,169,211,170,208,170,208,164" 
		arrPos[117]="152,150,159,147,163,145,167,141,169,143,171,147,172,152,173,158" 
		arrPos[43]="167,141,191,150,207,156,208,171,198,171,195,170,191,169,184,165,179,162,175,159,172,158,173,151,172,147,170,144" 
		arrPos[42]="201,138,208,141,210,146,212,151,213,155,207,155,206,147,204,144" 
		arrPos[41]="172,129,201,138,205,146,207,152,207,155,194,151,177,145,167,141,171,135,172,132" 
		arrPos[39]="195,124,199,127,204,134,208,141,201,138,198,131" 
		arrPos[38]="169,117,182,121,193,124,198,131,201,138,187,133,171,129,170,124" 
		arrPos[37]="145,114,157,115,169,117,171,124,172,130,172,133,169,138,164,145,161,147,148,151,138,155,131,156,119,155,111,150,107,147,112,142,112,136,110,129,110,126,111,124,121,124,129,125,135,124,139,121,143,118" 
		arrPos[141]="115,113,130,113,145,114,144,116,141,121,135,123,129,125,120,124,112,124,114,118" 
		arrPos[134]="143,82,153,82,151,90,148,100,145,113,137,113,123,113,115,113,118,107,129,98,135,92" 
		arrPos[29]="148,100,154,101,159,102,164,104,166,110,169,117,156,115,144,114,147,106" 
		arrPos[32]="164,104,173,106,178,114,182,121,176,119,169,117,167,111" 
		arrPos[30]="151,90,148,100,151,100,156,101,163,103,158,97,154,93" 
		arrPos[31]="152,82,160,82,165,92,169,100,172,106,167,105,164,103,158,97,154,93,151,90" 
		arrPos[24]="181,106,185,108,189,110,191,113,195,118,199,127,193,124,187,115,181,109" 
		arrPos[129]="147,76,153,76,153,80,152,82,144,82,145,79" 
		arrPos[128]="147,72,153,71,153,76,147,75,147,73" 
		arrPos[127]="146,67,153,67,153,71,147,71,147,69" 
		arrPos[126]="145,63,148,63,148,67,147,67,147,65" 
		arrPos[123]="148,58,145,59,145,61,146,63,148,63,148,61" 
		arrPos[19]="160,82,167,98,175,110,182,120,193,124,188,116,181,110,178,106,174,103,173,100,167,82" 
		arrPos[23]="181,90,184,94,183,95,183,98,181,101,181,104,181,109,179,108,179,97,180,92" 
		arrPos[22]="188,82,191,83,189,86,188,89,186,91,184,93,181,89" 
		arrPos[20]="162,65,172,65,172,66,174,76,175,81,176,83,181,89,180,93,179,98,179,107,176,105,173,100,170,93,167,82,165,72" 
		arrPos[21]="172,66,174,78,175,81,178,84,181,89,184,85,188,82,181,78,176,71" 
		arrPos[120]="175,70,178,73,184,76,201,81,198,82,193,82,191,83,183,79,179,76" 
		arrPos[8]="166,46,162,46,161,49,162,50,164,52,166,52,167,52" 
		arrPos[7]="167,46,167,35,167,31,165,28,159,27,155,29,153,32,152,38,152,47,153,59,153,69,153,78,153,82,167,82,161,65,172,65,167,52,165,52,164,52,162,50,161,49,161,47" 
		arrPos[5]="161,15,167,15,177,16,178,26,178,39,180,51,181,55,186,59,199,65,208,65,208,65,208,67,207,69,208,76,207,79,203,81,200,81,187,78,178,73,173,68,168,52,166,46,167,46,167,34,166,30,165,28,161,28" 
		arrPos[185]="161,15,156,16,152,16,148,20,148,27,147,36,147,47,148,59,148,67,153,67,152,54,152,38,153,32,156,29,158,27,161,27" 
		arrPos[3]="177,16,183,16,186,20,190,27,191,32,192,37,193,42,208,57,208,60,208,62,208,64,201,65,192,62,184,59,180,54,178,38,177,24" 
		arrPos[186]="161,1,154,3,148,7,142,14,139,22,138,31,138,41,141,47,142,50,144,56,145,58,148,59,147,48,147,38,148,26,149,19,153,16,156,16,161,15" 
		return arrPos[zonID];
	}
		
		
	//BACK
	if (posCHAMP=='4'){
		arrPos[186]="171,1,179,3,184,7,189,10,190,11,188,14,185,20,184,33,184,64,176,64,170,64" 
		arrPos[185]="190,11,195,17,197,23,197,32,197,42,196,48,194,57,194,62,192,71,183,71,184,35,184,23,186,16,188,13" 
		arrPos[123]="176,64,176,67,184,66,184,63" 
		arrPos[122]="170,63,170,66,175,66,175,62" 
		arrPos[125]="171,67,171,70,176,70,176,67" 
		arrPos[126]="176,67,184,67,184,71,171,72,171,70,176,70" 
		arrPos[98]="170,72,157,72,157,67,165,67,165,70,170,70" 
		arrPos[97]="157,66,165,67,165,63,157,62" 
		arrPos[124]="165,67,170,67,170,70,165,70" 
		arrPos[121]="165,64,170,64,170,67,165,67" 
		arrPos[127]="171,72,170,77,192,77,192,72" 
		arrPos[128]="170,78,192,77,191,80,170,80" 
		arrPos[129]="170,81,192,82,192,85,170,85" 
		arrPos[95]="157,71,157,54,157,37,156,23,155,16,152,12,150,11,148,15,146,19,144,25,144,32,145,42,145,44,147,50,149,62,149,71" 
		arrPos[7]="197,42,197,40,198,40,200,44,200,49,199,53,197,60,194,61,196,51" 
		arrPos[9]="145,42,143,40,140,41,138,45,140,49,140,55,145,61,148,61,147,50" 
		arrPos[99]="149,72,170,72,170,77,149,77" 
		arrPos[100]="170,80,170,78,149,77,149,81" 
		arrPos[101]="149,81,170,81,170,85,149,85" 
		arrPos[96]="150,10,153,8,157,5,162,3,166,2,171,1,170,63,157,62,157,35,157,27,155,21,154,15" 
		arrPos[130]="149,85,148,92,170,92,170,85" 
		arrPos[131]="170,85,170,91,193,92,192,86" 
		arrPos[132]="149,92,148,99,151,99,157,99,170,98,170,92" 
		arrPos[133]="170,92,193,92,194,100,185,99,170,98" 
		arrPos[135]="153,99,152,107,161,106,170,106,170,99,161,99" 
		arrPos[136]="170,99,170,106,177,107,186,107,185,99,177,99" 
		arrPos[103]="149,85,148,99,142,100,133,102,129,105,125,109,109,112,99,114,92,115,98,111,103,109,106,107,111,102,116,99,125,98,132,96,141,89" 
		arrPos[105]="126,109,130,105,134,102,140,101,148,99,153,99,152,107,140,107" 
		arrPos[137]="185,99,186,107,202,109,217,111,215,107,212,104,203,101,197,101" 
		arrPos[134]="192,86,215,98,216,98,223,99,230,102,234,107,239,108,243,111,248,114,250,117,232,113,217,111,216,108,213,105,207,102,198,100,194,99" 
		arrPos[141]="217,111,218,124,238,126,257,130,254,124,253,119,250,117,235,114" 
		arrPos[140]="186,107,202,109,217,112,219,124,202,122,186,120" 
		arrPos[139]="185,107,177,107,170,107,169,119,186,120" 
		arrPos[138]="152,107,170,106,170,119,151,119" 
		arrPos[106]="125,109,137,107,152,107,151,119,138,120,123,122" 
		arrPos[104]="125,110,106,113,92,115,88,122,84,129,99,126,111,124,123,122" 
		arrPos[40]="84,129,99,126,123,122,120,134,117,147,111,148,100,152,92,158,84,163,82,155,82,144,83,134" 
		arrPos[107]="123,122,137,120,151,119,151,132,135,133,120,135" 
		arrPos[142]="151,119,170,119,169,131,151,132" 
		arrPos[143]="170,119,186,120,186,132,169,132" 
		arrPos[144]="187,120,203,122,218,124,219,135,203,134,187,132" 
		arrPos[37]="218,124,235,126,257,131,257,138,258,148,257,158,257,163,249,159,242,156,232,152,222,149,220,143,219,135,219,129" 
		arrPos[148]="186,132,202,134,219,135,222,149,205,147,195,147,186,146" 
		arrPos[147]="186,132,169,132,169,146,186,146" 
		arrPos[146]="151,132,151,146,169,146,170,132" 
		arrPos[108]="120,135,132,134,141,132,151,132,151,146,138,146,127,147,118,147" 
		arrPos[182]="118,147,118,154,120,160,132,159,143,159,151,158,151,145,135,146" 
		arrPos[110]="118,149,120,161,114,161,116,155" 
		arrPos[111]="114,162,112,174,112,176,124,174,120,161" 
		arrPos[162]="120,161,124,174,137,172,151,172,151,158,136,159" 
		arrPos[149]="151,146,169,146,169,158,151,159" 
		arrPos[153]="151,159,169,159,169,172,151,172" 
		arrPos[150]="169,146,186,146,186,159,169,159" 
		arrPos[154]="170,159,186,159,186,172,170,172" 
		arrPos[151]="186,147,203,147,222,149,220,158,220,161,208,160,186,159" 
		arrPos[152]="222,149,220,161,227,163,225,158" 
		arrPos[155]="186,159,204,160,220,162,215,175,203,174,186,172" 
		arrPos[156]="220,162,227,163,227,165,229,170,229,174,227,177,215,175" 
		arrPos[112]="112,176,116,181,116,185,116,190,125,189,123,174" 
		arrPos[161]="123,174,137,172,151,172,152,185,138,186,125,188" 
		arrPos[157]="152,172,169,172,169,185,152,185" 
		arrPos[158]="170,172,186,172,186,185,169,185" 
		arrPos[159]="186,172,203,174,215,175,215,189,186,185" 
		arrPos[160]="215,176,227,178,222,190,215,188" 
		arrPos[113]="116,190,120,204,125,204,125,189" 
		arrPos[196]="125,188,141,186,153,185,169,185,169,199,149,200,137,201,125,203" 
		arrPos[195]="169,185,186,185,215,188,215,204,206,202,194,201,180,199,169,199" 
		arrPos[163]="215,189,222,190,218,204,215,203" 
		arrPos[114]="120,204,125,203,124,213" 
		arrPos[164]="125,203,136,202,149,200,169,199,169,214,153,215,140,216,130,218,124,220,124,213" 
		arrPos[167]="124,221,123,227,121,234,134,232,149,230,161,229,169,228,169,215,153,215,141,216,132,218" 
		arrPos[169]="121,234,120,244,120,247,120,250,135,246,147,244,159,242,168,241,169,228,154,230,141,230" 
		arrPos[171]="168,242,154,243,143,245,120,250,146,250" 
		arrPos[174]="169,242,168,267,166,268,163,271,162,272,140,272,140,262,141,257,143,253,144,250,147,250" 
		arrPos[173]="128,250,128,254,127,259,121,271,140,272,140,260,141,256,143,250,138,250" 
		arrPos[116]="119,250,118,253,116,259,116,262,115,271,121,271,127,256,128,250,125,250" 
		arrPos[194]="115,271,121,271,112,294,112,285" 
		arrPos[178]="112,295,116,297,116,302,117,305,120,312,125,316,130,309,132,307,135,306,138,305,161,305,159,301,157,295,156,287,157,281,159,276,161,272,140,272,122,271" 
		arrPos[183]="161,306,163,308,166,310,168,310,169,322,155,322,138,322,134,322,130,319,127,318,125,316,130,309,132,307,137,305,149,305" 
		arrPos[165]="169,200,183,200,197,201,209,203,215,204,216,213,216,221,206,218,189,216,177,214,170,214" 
		arrPos[166]="215,204,218,204,216,213" 
		arrPos[168]="169,215,179,215,189,216,200,217,215,221,218,236,204,232,187,230,177,229,169,228" 
		arrPos[170]="169,228,181,229,196,231,206,233,218,236,219,242,219,250,205,246,190,244,177,242,168,241" 
		arrPos[172]="170,242,179,242,190,244,200,246,212,249,219,250,194,250" 
		arrPos[175]="169,242,194,250,197,252,197,258,198,262,198,268,198,271,176,272,173,269,171,268,168,267" 
		arrPos[176]="195,250,212,250,212,252,214,258,218,271,208,271,198,271,198,262,197,258,197,253,197,251" 
		arrPos[177]="212,250,219,250,221,252,221,255,221,258,225,271,218,271,214,256,213,252" 
		arrPos[193]="217,271,225,271,226,275,227,279,229,291" 
		arrPos[181]="176,272,188,272,198,271,218,271,229,293,224,302,217,316,214,310,208,307,205,305,177,305,179,299,182,294,182,287,182,281,179,276" 
		arrPos[184]="177,306,190,305,204,305,208,307,211,309,214,312,217,316,214,318,209,319,203,321,187,322,169,322,168,310,172,309,174,308" 
		arrPos[179]="168,268,168,310,164,308,160,303,157,297,157,292,157,285,158,279,161,274,163,271,165,269" 
		arrPos[180]="169,268,173,269,177,273,180,278,182,283,182,290,181,296,178,302,175,307,172,309,168,310" 
		arrPos[71]="172,322,188,321,188,336,188,353,186,365,185,373,184,381,179,366,175,352,172,341,171,330" 
		arrPos[72]="155,322,167,322,168,328,168,336,167,346,165,356,163,366,162,375,159,381,157,367,155,354,154,343,155,331" 
		arrPos[69]="229,293,227,296,224,302,222,312,222,325,223,338,225,345,228,361,232,384,237,417,240,401,242,387,242,375,240,356,235,334,232,314,230,305" 
		arrPos[74]="112,295,113,303,112,314,110,326,109,336,107,351,108,365,110,383,112,398,114,410,116,384,116,362,118,336,118,323,118,312,117,305,116,299,115,296" 
		arrPos[118]="118,307,122,312,125,316,130,320,135,322,143,322,155,322,154,336,155,361,157,371,159,381,157,388,157,399,157,408,156,427,154,434,153,442,151,446,148,454,143,459,138,466,132,479,128,491,125,477,120,467,113,451,113,430,114,410,116,390,116,375,117,350,118,325" 
		arrPos[78]="114,452,117,461,116,472,116,479,116,487,114,492,114,503,116,520,118,532,127,576,130,595,132,602,129,608,123,615,124,607,125,603,127,599,127,591,120,564,116,543,108,507,107,497,109,482,112,465" 
		arrPos[90]="100,152,98,157,95,161,93,167,90,174,86,183,84,192,82,196,82,199,83,203,84,205,117,147,109,149" 
		arrPos[91]="118,147,84,205,88,208,90,211,93,205,99,198,101,193,104,181,113,165,116,153" 
		arrPos[88]="100,152,92,158,84,163,81,168,76,177,73,185,70,193,66,199,61,205,55,216,52,236,49,251,46,260,43,268,39,274,34,281,28,295,24,295,18,299,13,305,11,312,13,314,16,314,13,322,12,327,15,329,17,329,20,326,18,330,21,332,24,332,26,330,27,333,30,334,43,297,65,242,73,219,80,214,86,213,90,213,91,211,86,206,82,202,82,193,89,176,95,163" 
		arrPos[93]="11,312,8,318,8,320,11,321,13,318,15,315,13,314" 
		arrPos[187]="224,302,217,314,215,316,210,319,203,321,188,321,188,345,188,354,186,368,184,381,192,405,197,422,198,435,201,446,207,455,210,463,213,473,214,479,214,491,220,479,229,465,238,451,237,434,237,422,237,416,233,390,227,361,222,334,222,323,222,312" 
		arrPos[76]="200,446,206,454,209,460,212,469,213,474,214,491,214,514,214,540,214,559,212,578,210,593,207,609,208,589,208,574,208,559,206,538,198,525,198,512,199,503,201,492,205,478,205,467" 
		arrPos[188]="229,465,220,479,214,491,214,524,214,548,214,563,212,579,210,591,207,608,205,619,212,625,219,634,261,633,263,632,265,631,268,632,272,631,273,628,272,625,263,625,254,625,243,624,235,621,227,616,222,611,219,607,220,600,225,578,231,548,232,527,232,508,229,496,227,479" 
		arrPos[79]="204,619,203,625,203,628,205,633,208,633,219,634,210,624" 
		arrPos[75]="272,625,261,625,250,624,243,623,233,620,227,616,222,610,220,607,225,581,229,559,232,539,232,524,232,508,229,493,227,479,229,465,238,451,238,455,243,470,245,487,246,496,244,514,241,537,235,559,231,589,231,601,235,606,246,614,257,620,265,621,268,624" 
		arrPos[80]="117,461,116,476,116,485,115,492,114,504,116,520,120,539,125,563,129,589,132,602,129,607,124,615,121,617,118,621,115,625,115,628,116,630,120,631,120,624,123,620,125,617,132,613,135,609,135,591,135,575,132,553,129,530,127,511,127,499,127,494,129,491,123,475" 
		arrPos[119]="135,609,130,614,125,617,123,622,120,625,120,631,132,632,138,632,145,631,149,631,148,624,147,621,141,616" 
		arrPos[77]="150,448,138,464,134,476,127,493,127,511,128,524,130,541,132,559,135,582,135,597,135,609,147,621,148,625,149,630,149,628,149,624,149,622,149,618,149,610,149,602,148,587,146,571,145,555,147,535,149,521,149,505,148,492,145,480,147,468" 
		arrPos[92]="56,215,51,230,49,237,46,249,34,280,39,274,45,266,46,260,51,242,53,230" 
		arrPos[89]="90,213,82,213,79,214,73,219,69,228,66,239,57,262,44,297,50,297,52,288,57,278,66,260,73,249,82,232,84,228,88,216" 
		arrPos[93]="12,327,10,333,6,339,6,342,7,345,10,343,12,339,16,330,18,330,16,336,13,342,13,345,16,345,18,343,21,339,24,332,28,333,26,338,24,344,24,346,26,346,30,334,28,333,24,332,22,332,18,330,16,329,15,329" 
		arrPos[94]="44,297,31,331,26,346,27,346,31,342,35,330,32,344,32,346,33,346,40,334,45,323,49,310,50,298" 
		arrPos[81]="242,156,245,161,249,174,255,187,257,196,257,201,255,205,254,207,250,213,251,213,255,214,261,216,265,217,267,221,279,249,287,273,298,298,310,330,312,336,314,336,314,331,315,330,318,334,321,334,324,332,322,328,323,327,325,331,329,330,331,328,329,322,326,316,331,312,328,307,324,301,320,297,314,295,308,282,298,271,294,262,290,247,285,218,281,208,274,197,268,193,265,177,257,164,250,160" 
		arrPos[83]="223,149,232,153,242,156,245,161,249,175,254,186,257,196,257,202,255,206,247,188,239,173,232,160" 
		arrPos[84]="222,149,232,161,238,171,244,182,250,197,255,205,252,210,250,211,245,203,241,197,233,178,228,163" 
		arrPos[85]="286,218,287,229,290,242,293,257,294,262,298,271,307,281,297,254" 
		arrPos[82]="251,214,255,214,261,216,265,219,268,223,276,243,284,263,298,298,292,299,291,295,288,285,280,270,266,249,255,228" 
		arrPos[86]="331,312,333,319,332,321,328,320,326,316,328,314" 
		arrPos[87]="292,299,298,298,306,321,310,330,314,348,313,347,312,346,307,330,305,331,307,339,308,346,307,348,304,348,300,338,299,329,296,322,292,307" 
		arrPos[86]="312,336,314,348,315,347,314,336,318,336,324,346,327,346,328,345,324,333,326,332,332,344,334,345,335,342,331,328,329,330,325,331,321,334,318,334,314,336"  
		return arrPos[zonID];
	}
}


function createAccount(){
	tmpTarget = "createAccount";
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url="createAccount.asp?f=null";
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=updatedTarget 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)	
}


function sendPW(){
	document.getElementById("forgotPW").innerHTML="Uppgifter har skickats till angiven e-postadress"	
}



function forgotPW(){
	document.getElementById("forgotPW").innerHTML="<input type='text' size='25' class='text' value='Skriv in din e-post här'> <input type='button' value='Skicka' class='text' onClick='javascript:sendPW()'>"
}




function goBrand(){
	// Brand message
	
}

// Dummy ==================================


function greenThis(timeID){
	document.getElementById(timeID).style.backgroundColor="#4db848"
	document.getElementById(timeID).style.color="#ffffff"
}

function whiteThis(timeID){
	document.getElementById(timeID).style.backgroundColor="#ffffff"
	document.getElementById(timeID).style.color="#000000"
}

function bookThis(timeID){
	tmpTarget = "showSchedule";
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url="dummy_bookTime.asp?timeID=" + timeID; // Dummy value for target time
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=updatedTarget 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}



function dummy_time(){
	tmpTarget = "showSchedule";
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url="dummy_showSchedule.asp?pID=1"; // Dummy value for target person
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=updatedTarget 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function myUsualThearapist(){
	var id_t=1 // Just DEMO id
	url="bokaDirekt.asp?id_t=" + id_t;
	window.location.href=url;
}

function dummy_ajax_cityResult(compareA){
	tmpTarget = "displayCityResult";
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url="dummy_ajax_cityResult.asp?compareA=" + compareA;
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=updatedTarget 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function dummy_goBokaDirekt(id_t){
	// Go to save result
	url="bokaDirekt.asp?id_t=" + id_t;
	window.location.href=url;
}

function confirmBooking(timeButtonID){
	document.getElementById(timeButtonID).style.backgroundColor="#04fe05";
	
	document.getElementById("confirmTime").style.backgroundColor="#04fe05";
	document.getElementById("confirmTime").innerHTML="BOKAD!"
}



// Buttons ================================


function goFinish(email,gender){
	// Clear values
	var arrPoints=new Array();
	var arrPointsPosition=new Array();
	var myPaintPointsValue=new Array();
	var myPaintPointsValue_medb=new Array();
	var iCount
	iCount=0;
	// Back to frontpage
	if (gender=='f'){
	url="champ_fm.asp?posCHAMP=1&email=" + email + "&gender=f";
	}
	if (gender=='m'){
	url="champ.asp?posCHAMP=1&email=" + email + "&gender=m";
	}
	if (gender==''){
	url="champ_fm.asp?posCHAMP=1&email=" + email + "&gender=f";
	}
	window.location.href=url;
}




function goBook(resultMGN,resultMGN_standAlone,email){
	// Go to book page step one - Eniro
	//url="http://champ.se/champBook.asp?resultMGN=" + resultMGN + "&resultMGN_standAlone=" + resultMGN_standAlone;
	//url="http://champ.se/wihiteapi/whipteapi.asp?resultMGN=" + resultMGN + "&resultMGN_standAlone=" + resultMGN_standAlone;
	url="http://champ.se/whiteapi/champ.html?email=" + email;
	window.location.href=url;
}


function goResult(resultMGN,resultMGN_standAlone){
	// Go to book page step one - Eniro
	url="champResult.asp?resultMGN=" + resultMGN + "&resultMGN_standAlone=" + resultMGN_standAlone;
	window.location.href=url;
}


// ========================================








//DAVIDS KONTROLL ------------------------------------------------------------------------------------------------------

function showValue(zonID){
	var xpos = document.ShowPos.MouseX.value;
	var ypos = document.ShowPos.MouseY.value;
	creatediv(xpos,ypos);
	// alert("Zon nr: " + zonID + ". Kopplad info: " + returnZonContent(zonID))
}

//DAVIDS KONTROLL ------------------------------------------------------------------------------------------------------


// FUNCTION FOR EXPLANATION OF MEDICAL RESULT

function returnResultContent(resultMGN,resultMGN_standAlone,standAloneNumber,resultMGN_segm_VS_medb){
	var textResultArray=new Array();
	textResultArray[0]="Nothing";
	textResultArray[1]="C1,Övre delen av nacken";
	textResultArray[2]="C2,Övre delen av nacken";
	textResultArray[3]="C3,Övre delen av nacken";
	textResultArray[4]="C4,Övre delen av nacken";
	textResultArray[5]="C5,Övergången nacke/rygg";
	textResultArray[6]="C6,Övergången nacke/rygg";
	textResultArray[7]="C7,Övergången nacke/rygg";
	textResultArray[8]="T1,Övergången nacke/rygg";
	textResultArray[9]="T2,Övergången nacke/rygg";
	textResultArray[10]="T3,Mellan skulderbladen";
	textResultArray[11]="T4,Mellan skulderbladen";
	textResultArray[12]="T5,Mellan skulderbladen";
	textResultArray[13]="T6,Mellan skulderbladen";
	textResultArray[14]="T7,Mitten av ryggen";
	textResultArray[15]="T8,Mitten av ryggen";
	textResultArray[16]="T9,Mitten av ryggen";
	textResultArray[17]="T10,Mitten av ryggen";
	textResultArray[18]="T11,Övergången bröstkorg/ländrygg";
	textResultArray[19]="T12,Övergången bröstkorg/ländrygg";
	textResultArray[20]="L1,Övergången bröstkorg/ländrygg";
	textResultArray[21]="L2,Övergången bröstkorg/ländrygg";
	textResultArray[22]="L3,Ländrygg/bäcken";
	textResultArray[23]="L4,Ländrygg/bäcken";
	textResultArray[24]="L5,Ländrygg/bäcken";
	textResultArray[25]="SI-led,Ländrygg/bäcken";
	textResultArray[26]="Coccyx,Svanskota";
	textResultArray[27]="Acromioclavicularled,Axelleden";
	textResultArray[28]="Costa 1,Första revbenet";
	textResultArray[29]="Glenohumeralled,Axelleden"	;
	textResultArray[30]="Armbågsled,Armbågen";
	textResultArray[31]="Prox. radioulnarled,Armbågen";
	textResultArray[32]="Dist. radioulnarled,Handleden";
	textResultArray[33]="Handled,Handleden";
	textResultArray[34]="CMC 1,Fingerleder";
	textResultArray[35]="MCP,Fingerleder";
	textResultArray[36]="Interphalangealleder,Fingerleder";
	textResultArray[37]="Höftled,Höften";
	textResultArray[38]="Knäled,Knät";
	textResultArray[39]="Prox. tibiofibularled,Knät";
	textResultArray[40]="Dist. tibiofibularled,Vristen";
	textResultArray[41]="Fotled,Vristen";
	textResultArray[42]="Intertarsalleder,Foten";
	textResultArray[43]="MTP,Foten";
	textResultArray[44]="Ögon,Ögon";
	textResultArray[45]="Tårkörtlar,Ögon";
	textResultArray[46]="Submandibulära & sublinguala körtlar,Halsen";
	textResultArray[47]="Öron,Öron";
	textResultArray[48]="Näsa,Näsa";
	textResultArray[49]="Svalg,Svalg";
	textResultArray[50]="Sköldkörtel,Sködkörteln";
	textResultArray[51]="Hjärta,Hjärta";
	textResultArray[52]="Lungor,Lungor";
	textResultArray[53]="Lever,Lever";
	textResultArray[54]="Gallblåsa,Gallblåsa";
	textResultArray[55]="Diafragma,Mellangärdet";
	textResultArray[56]="Solar plexus,Solar plexus";
	textResultArray[57]="Luftstrupe,Luftstrupe";
	textResultArray[58]="Matstrupe,Matstrupe";
	textResultArray[59]="Magsäck";
	textResultArray[60]="Bukspottkörtel,Bukspottkörtel";
	textResultArray[61]="Tolvfingertarm,Tolvfingertarm";
	textResultArray[62]="Tunntarm";
	textResultArray[63]="Blindtarm";
	textResultArray[64]="Tjocktarm desc.,Tjocktarm";
	textResultArray[65]="Mjälte,Mjälte";
	textResultArray[66]="Aorta aneurysm,Kroppspulsådern";
	textResultArray[67]="Livmoder,Livmoder";
	textResultArray[68]="Prostata,Prostata";
	textResultArray[69]="Blåsa,Blåsa";
	textResultArray[70]="Tjocktarm asc.,Tjocktarm";
	textResultArray[71]="Testiklar,Testiklar";
	textResultArray[72]="Njurar,Njurar";
	textResultArray[73]="Urinledare,Urinledare";
	textResultArray[74]="Prox urinledare,Urinledare";
	textResultArray[75]="Binjurar,Binjurar";
	textResultArray[76]="Äggledare,Äggledare";
	textResultArray[77]="Äggstockar,Äggstockar";
	textResultArray[78]="Ljumske,Ljumske";
	textResultArray[79]="S1,Ländrygg/bäcken";
	textResultArray[80]="S2,Ländrygg/bäcken";
	textResultArray[81]="S3,Ländrygg/bäcken";
	textResultArray[82]="S4,Ländrygg/bäcken";


	// Get length of the textResultArray
	var loopLength = textResultArray.length;


	//---------------------------------------
	// Search result for resultMGN
	//---------------------------------------

	// Declare foundText
	var foundText = new Array();
	
	// Split into an array 
	var foundText = resultMGN.split(",");
	
	// Get length of the array foundText
	var foundLength = foundText.length;
		
	// Declare starting value
	var ResultMess="";
		
	// Loop and look for comparising in the textResultArray
	for (var i=0; i<loopLength; i++){
		
		var compareText = new Array();
		var compareText = textResultArray[i].split(",")
		
		for (var j=0; j<foundLength; j++){
			
			
			
			// If its a match, put it in the ResultMess string
			if (compareText[0]==foundText[j]){
				var strToAdd = compareText[1] + "<br>";
				
				//Avoid duplicate resultstring
				var alreadyExists = ResultMess.indexOf(compareText[1]);
				
				if (alreadyExists==-1){
				ResultMess = ResultMess.concat(strToAdd);
				}
			}
		}
	}
		
	//----------------------------------------
	// Search result for resultMGN_standAlone
	//----------------------------------------
	
	// Clear foundText
	var foundText = new Array();
	
	// Split into an array 
	var foundText = resultMGN_standAlone.split(",");
	
	// Get length of the array foundText
	var foundLength = foundText.length;
	
	// Declare starting value
	var ResultMess_standAlone="";
		
	// Loop and look for comparising in the textResultArray
	for (var i=0; i<loopLength; i++){
		
		var compareText = new Array();
		var compareText = textResultArray[i].split(",")
		
		for (var j=0; j<foundLength; j++){
			// If its a match, put it in the ResultMess string
			if (compareText[0]==foundText[j]){
				var strToAdd = compareText[1] + "<br>";
				
				//Avoid duplicate resultstring
				var alreadyExists = ResultMess_standAlone.indexOf(compareText[1]);
				
				if (alreadyExists==-1){
				ResultMess_standAlone = ResultMess_standAlone.concat(strToAdd);
				}
			}
		}
	}
	
	//---------------------------------------
	// Search result for resultMGN_segm_VS_medb
	//---------------------------------------

	// Declare foundText
	var foundText = new Array();
	
	// Split into an array 
	var foundText = resultMGN_segm_VS_medb.split(",");
	
	// Get length of the array foundText
	var foundLength = foundText.length;
		
	// Declare starting value
	var ResultMess_segm_VS_medb="";
		
	// Loop and look for comparising in the textResultArray
	for (var i=0; i<loopLength; i++){
		
		var compareText = new Array();
		var compareText = textResultArray[i].split(",")
		
		for (var j=0; j<foundLength; j++){
			
			
			
			// If its a match, put it in the ResultMess string
			if (compareText[0]==foundText[j]){
				var strToAdd = compareText[1] + "<br>";
				
				//Avoid duplicate resultstring
				var alreadyExists = ResultMess_segm_VS_medb.indexOf(compareText[1]);
				
				if (alreadyExists==-1){
				ResultMess_segm_VS_medb = ResultMess_segm_VS_medb.concat(strToAdd);
				}
			}
		}
	}
	
	//alert("ResultMess " + ResultMess)
//	alert("ResultMess_standAlone " + ResultMess_standAlone)
//	alert("ResultMess_segm_VS_medb " + ResultMess_segm_VS_medb)
		
		
	//----------------------------------------
	// Display result
	//----------------------------------------
	
	if (ResultMess!="" && ResultMess_standAlone==""){
		
	var introText = "Symptomen Du beskriver pekar på att orsaken till dem kommer från<p><strong>"
	
	document.getElementById("ResultText_painOrigin1").innerHTML = introText + ResultMess;
	document.getElementById("txtPainOrigin1").value = ResultMess;
		
	}
	
	if (ResultMess=="" && ResultMess_segm_VS_medb!=""){
		
	var introText = "Symptomen Du beskriver pekar på att orsaken till dem kommer från<p><strong>"
	
	document.getElementById("ResultText_painOrigin1").innerHTML = introText + ResultMess_segm_VS_medb;
	document.getElementById("txtPainOrigin1").value = ResultMess_segm_VS_medb;
		
	}
	
	
	if (ResultMess=="" && ResultMess_segm_VS_medb==""){
		
	var introText = "Symptomen Du beskriver pekar på att orsaken till dem kommer från<p><strong>"
	
	document.getElementById("ResultText_painOrigin1").innerHTML = introText + ResultMess_standAlone;
	document.getElementById("txtPainOrigin1").value = ResultMess_standAlone;
		
	}
	
	if (ResultMess!="" && ResultMess_segm_VS_medb!=""){
		
	var introText = "Symptomen Du beskriver pekar på att orsaken till dem kommer från<p><strong>"
	
	document.getElementById("ResultText_painOrigin1").innerHTML = introText + ResultMess;
	document.getElementById("txtPainOrigin1").value = ResultMess;
	
	var introText2 = "<p><br>Andra symptomområden som Du beskriver pekar på att orsaken till dem kommer från<p><strong>"
	
	document.getElementById("ResultText_painOrigin2").innerHTML = introText2 + ResultMess_segm_VS_medb;
	document.getElementById("txtPainOrigin2").value = ResultMess_segm_VS_medb;
		
	}
	
	
	
	//if (ResultMess!="" && ResultMess_standAlone!=""){
//		
//	var introText = "Det verkar som det finns flera utgångspunkter för symptomen:<p><strong>"
//	
//	document.getElementById("ResultText_painOrigin2").innerHTML = introText + ResultMess;
//	
//	document.getElementById("txtPainOrigin2").value = ResultMess_standAlone;
//
//	}
//	
//	if (ResultMess=="" && ResultMess_standAlone!=""){
//		
//		if (standAloneNumber>1){
//		
//		var introText = "Det verkar som det finns flera utgångspunkter för symptomen:<p><strong>"
//		
//		document.getElementById("ResultText_painOrigin2").innerHTML = introText + ResultMess_standAlone;
//		}
//		else
//		{
//			
//		var introText = "Symptomen Du beskriver pekar på att orsaken till dem kommer från<p><strong>"
//		
//		document.getElementById("ResultText_painOrigin2").innerHTML = introText + ResultMess;
//		
//		document.getElementById("txtPainOrigin2").value = ResultMess_standAlone;
//			
//			
//		}
//
//	}
	
	
	
	//if (ResultMess=="" && ResultMess_standAlone!=""){
//		
//	var introText = "Symptomen Du beskriver pekar på att orsaken till dem kommer från<p><strong>"
//	
//	document.getElementById("ResultText_painOrigin1").innerHTML = introText + ResultMess_standAlone;
//	
//	document.getElementById("txtPainOrigin1").value = ResultMess_standAlone;
//		
//	}
//	
//	if (ResultMess!="" && ResultMess_standAlone!=""){
//		
//	var introText = "Det verkar som det finns flera utgångspunkter för symptomen:<p><strong>"
//	
//	document.getElementById("ResultText_painOrigin2").innerHTML = introText + ResultMess_standAlone;
//	
//	document.getElementById("txtPainOrigin2").value = ResultMess_standAlone;
//
//	}
	
	
}


function saveResultContent(compareA){
	// Ej aktiverat <----------------------------------------------------------------------------- !!!!!!!!
	}



// ARRAY FOR INITIAL MEDICAL DATA

function returnZonContent(zonID){
	var zonArray=new Array();
	zonArray[0]="Nothing";
	zonArray[1]="C1,C2,C3";
	zonArray[2]="C1,C2,C3";
	zonArray[3]="C1,C2,C3";
	zonArray[4]="C1,C2,C3";
	zonArray[5]="C1,C2,C3";
	zonArray[6]="C1,C2,C3";
	zonArray[7]="C2,C3";
	zonArray[8]="";
	zonArray[9]="C2,C3";
	zonArray[10]="";
	zonArray[11]="C1,C2,C3";
	zonArray[12]="C1,C2,C3";
	zonArray[13]="C1,C2,C3";
	zonArray[14]="C1,C2,C3";
	zonArray[15]="C1,C2,C3";
	zonArray[16]="C1,C2,C3";
	zonArray[17]="C1,C2,C3";
	zonArray[18]="C1,C2,C3";
	zonArray[19]="C3,C4";
	zonArray[20]="C2,C3";
	zonArray[21]="C1,C2,C3";
	zonArray[22]="C2,C3";
	zonArray[23]="C2,C3";
	zonArray[24]="C3,C4";
	zonArray[25]="C2,C3";
	zonArray[26]="C1,C2,C3";
	zonArray[27]="C2,C3";
	zonArray[28]="C2,C3";
	zonArray[29]="C3,C4";
	zonArray[30]="C3,C4";
	zonArray[31]="C3,C4";
	zonArray[32]="C3,C4";
	zonArray[33]="C3,C4";
	zonArray[34]="C3,C4";
	zonArray[35]="C3,C4";
	zonArray[36]="C3,C4";
	zonArray[37]="C5,C6";
	zonArray[38]="C5,C6,C7,C8,T2";
	zonArray[39]="C5,C6,C7,C8,T2";
	zonArray[40]="C5,C6";
	zonArray[41]="C5,C6,C7,C8,T3";
	zonArray[42]="C5,C6,C7,C8,T3";
	zonArray[43]="C5,C6,C7,C8,T4";
	zonArray[44]="C5,C6,C7,C8,T4";
	zonArray[45]="C5,C6,C7,T5";
	zonArray[46]="T5";
	zonArray[47]="T5";
	zonArray[48]="C5,C6,C7,T5";
	zonArray[49]="C5,C6,C7,T6";
	zonArray[50]="T6";
	zonArray[51]="T6";
	zonArray[52]="C5,C6,C7,T6";
	zonArray[53]="T7";
	zonArray[54]="T7";
	zonArray[55]="T8";
	zonArray[56]="T8";
	zonArray[57]="T9";
	zonArray[58]="T9";
	zonArray[59]="T10";
	zonArray[60]="T10";
	zonArray[61]="T11";
	zonArray[62]="T11";
	zonArray[63]="T12,L1";
	zonArray[64]="T12,L1";
	zonArray[65]="L1";
	zonArray[66]="L1";
	zonArray[67]="L1,L2";
	zonArray[68]="L1,L2";
	zonArray[69]="L2,L3";
	zonArray[70]="L2,L3,L4";
	zonArray[71]="L2,L3,L4";
	zonArray[72]="L2,L3,L4";
	zonArray[73]="L2,L3,L4";
	zonArray[74]="L2,L3";
	zonArray[75]="L4,L5,S1,S2";
	zonArray[76]="L2,L3,L4";
	zonArray[77]="L2,L3,L4";
	zonArray[78]="L4,L5,S1,S2";
	zonArray[79]="S1,S2";
	zonArray[80]="S1,S2";
	zonArray[81]="C5,C6,C7,C8";
	zonArray[82]="C8,T1";
	zonArray[83]="C8,T1";
	zonArray[84]="T2";
	zonArray[85]="C5,C6,C7";
	zonArray[86]="C6,C7,C8,T1";
	zonArray[87]="C7,C8,T1";
	zonArray[88]="C5,C6,C7,C8";
	zonArray[89]="C8,T1";
	zonArray[90]="C8,T1";
	zonArray[91]="T2";
	zonArray[92]="C5,C6,C7";
	zonArray[93]="C6,C7,C8,T1";
	zonArray[94]="C7,C8,T1";
	zonArray[95]="C2,C3";
	zonArray[96]="C2";
	zonArray[97]="C1";
	zonArray[98]="C2";
	zonArray[99]="C3";
	zonArray[100]="C4";
	zonArray[101]="C5";
	zonArray[102]="C1,C2,C3";
	zonArray[103]="C3,C4,C5,C6";
	zonArray[104]="C5,C6,T2";
	zonArray[105]="C3,C4,T1";
	zonArray[106]="C5,C6,C7,T2";
	zonArray[107]="C5,C6,C7,T3";
	zonArray[108]="C5,C6,C7,T4";
	zonArray[109]="C5,C6,C7,T4";
	zonArray[110]="C6,C7,C8,T5";
	zonArray[111]="C6,C7,C8,T6";
	zonArray[112]="C6,C7,C8,T7";
	zonArray[113]="C6,C7,C8,T8";
	zonArray[114]="C6,C7,C8,T9";
	zonArray[115]="C6,C7,C8,T10";
	zonArray[116]="T12,L1,L4,L5,S1";
	zonArray[117]="C5,C6,C7,T4";
	zonArray[118]="L4,L5,S1,S2,S3";
	zonArray[119]="S1,S2";
	zonArray[120]="C1,C2,C3";
	zonArray[121]="C1,C3";
	zonArray[122]="C1,C3";
	zonArray[123]="C1";
	zonArray[124]="C2,C3";
	zonArray[125]="C2,C3";
	zonArray[126]="C2";
	zonArray[127]="C3";
	zonArray[128]="C4";
	zonArray[129]="C5";
	zonArray[130]="C5,C6";
	zonArray[131]="C5,C6";
	zonArray[132]="C5,C6,C7";
	zonArray[133]="C5,C6,C7";
	zonArray[134]="C3,C4,C5,C6";
	zonArray[135]="C5,C6,T1";
	zonArray[136]="C5,C6,T1";
	zonArray[137]="C3,C4,T1";
	zonArray[138]="C5,C6,T2";
	zonArray[139]="C5,C6,T2";
	zonArray[140]="C5,C6,C7,T2";
	zonArray[141]="C5,C6,T2";
	zonArray[142]="C5,C6,T3";
	zonArray[143]="C5,C6,T3";
	zonArray[144]="C5,C6,C7,T3";
	zonArray[145]="C6,C7,C8,T10";
	zonArray[146]="C5,C6,T4";
	zonArray[147]="C5,C6,T4";
	zonArray[148]="C5,C6,C7,T4";
	zonArray[149]="C5,C6,T5";
	zonArray[150]="C5,C6,T5";
	zonArray[151]="C5,C6,C7,T5";
	zonArray[152]="C6,C7,C8,T5";
	zonArray[153]="C5,C6,T6";
	zonArray[154]="C5,C6,T6";
	zonArray[155]="C5,C6,C7,T6";
	zonArray[156]="C6,C7,C8,T6";
	zonArray[157]="C5,C6,T7";
	zonArray[158]="C5,C6,T7";
	zonArray[159]="C5,C6,C7,T7";
	zonArray[160]="C6,C7,C8,T7";
	zonArray[161]="C5,C6,C7,T7";
	zonArray[162]="C5,C6,C7,T6";
	zonArray[163]="C6,C7,C8,T8";
	zonArray[164]="T9,L1";
	zonArray[165]="T9,L1";
	zonArray[166]="C6,C7,C8,T9";
	zonArray[167]="T10,L1,L2";
	zonArray[168]="T10,L1,L2";
	zonArray[169]="T11,L3,L4";
	zonArray[170]="T11,L3,L4";
	zonArray[171]="T12,L3,L4,L5";
	zonArray[172]="T12,L3,L4,L5";
	zonArray[173]="L4,L5,S1";
	zonArray[174]="L1,L2,L3,L5";
	zonArray[175]="L1,L2,L3,L5";
	zonArray[176]="L4,L5,S1";
	zonArray[177]="T12,L1,L4,L5,S1";
	zonArray[178]="L4,L5,S1,S2";
	zonArray[179]="S1,S2,S3";
	zonArray[180]="S1,S2,S3";
	zonArray[181]="L4,L5,S1,S2";
	zonArray[182]="C5,C6,C7,T5";
	zonArray[183]="L4,S1,S2,S3";
	zonArray[184]="L4,S1,S2,S3";
	zonArray[185]="C2";
	zonArray[186]="C2,C3";
	zonArray[187]="L4,L5,S1,S2,S3";
	zonArray[188]="S1,S2";
	zonArray[189]="L2,L3,L4";
	zonArray[190]="S1,S2";
	zonArray[191]="S1,S2,S3,S4";
	zonArray[192]="L4,L5";
	zonArray[193]="L4,L5";
	zonArray[194]="T12,L1";
	zonArray[195]="T12,L1";
	zonArray[196]="T8";
	zonArray[197]="T8";
	return zonArray[zonID];
}


function returnZonContent_medb(zonID){
	var medbArray=new Array();
	medbArray[0]="Nothing";
	medbArray[1]="T1,T2,T3,L3,L4,L5";
	medbArray[2]="T1,T2,T3,L3,L4,L5";
	medbArray[3]="T1,T2,T3,L3,L4,L5";
	medbArray[4]="T1,T2,T3,L3,L4,L5";
	medbArray[5]="T1,T2,T3,L3,L4,L5";
	medbArray[6]="T1,T2,T3,L3,L4,L5";
	medbArray[7]="T2,T3,L3,L4";
	medbArray[8]="";
	medbArray[9]="T2,T3,L3,L4";
	medbArray[10]="";
	medbArray[11]="T1,T2,T3,L3,L4,L5";
	medbArray[12]="T1,T2,T3,L3,L4,L5";
	medbArray[13]="T1,T2,T3,L3,L4,L5";
	medbArray[14]="T1,T2,T3,L3,L4,L5";
	medbArray[15]="T1,T2,T3,L3,L4,L5";
	medbArray[16]="T1,T2,T3,L3,L4,L5";
	medbArray[17]="T1,T2,T3,L3,L4,L5";
	medbArray[18]="T1,T2,T3,L3,L4,L5";
	medbArray[19]="T3,T4,L2,L3";
	medbArray[20]="T2,T3,L3,L4";
	medbArray[21]="T1,T2,T3,L3,L4,L5";
	medbArray[22]="T2,T3,L3,L4";
	medbArray[23]="T2,T3,L3,L4";
	medbArray[24]="T3,T4,L2,L3";
	medbArray[25]="T2,T3,L3,L4";
	medbArray[26]="T1,T2,T3,L3,L4,L5";
	medbArray[27]="T2,T3,L3,L4";
	medbArray[28]="T2,T3,L3,L4";
	medbArray[29]="T3,T4,L2,L3";
	medbArray[30]="T3,T4,L2,L3";
	medbArray[31]="T3,T4,L2,L3";
	medbArray[32]="T3,T4,L2,L3";
	medbArray[33]="T3,T4,L2,L3";
	medbArray[34]="T3,T4,L2,L3";
	medbArray[35]="T3,T4,L2,L3";
	medbArray[36]="T3,T4,L2,L3";
	medbArray[37]="T5,T6,T12,L1";
	medbArray[38]="C2,T5,T6,T7,T8,T9,T11,T12,L1";
	medbArray[39]="C2,T5,T6,T7,T8,T9,T11,T12,L1";
	medbArray[40]="T5,T6,T12,L1";
	medbArray[41]="C3,T5,T6,T7,T8,T11,T12,L1";
	medbArray[42]="C3,T5,T6,T7,T8,T11,T12,L1";
	medbArray[43]="C4,T5,T6,T7,T8,T11,T12,L1";
	medbArray[44]="C4,T5,T6,T7,T8,T11,T12,L1";
	medbArray[45]="T6,T7,T11,T12,L1";
	medbArray[46]="C5,T6";
	medbArray[47]="C5,T6";
	medbArray[48]="T6,T7,T11,T12,L1";
	medbArray[49]="T5,T7,T11,T12,L1";
	medbArray[50]="C6,T5";
	medbArray[51]="C6,T5";
	medbArray[52]="T5,T7,T11,T12,L1";
	medbArray[53]="C7,T4";
	medbArray[54]="C7,T4";
	medbArray[55]="C8,T3";
	medbArray[56]="C8,T3";
	medbArray[57]="C8,T2";
	medbArray[58]="C8,T2";
	medbArray[59]="T1,L3";
	medbArray[60]="T1,L3";
	medbArray[61]="C7,L4";
	medbArray[62]="C7,L4";
	medbArray[63]="C5,C6,L5,S1";
	medbArray[64]="C5,C6,L5,S1";
	medbArray[65]="C5,S1";
	medbArray[66]="C5,S1";
	medbArray[67]="C4,C5,S1,S2";
	medbArray[68]="C4,C5,S1,S2";
	medbArray[69]="C3,C4,T10,S2";
	medbArray[70]="C2,C3,C4,T10,T11,S2";
	medbArray[71]="C2,C3,C4,T10,T11,S2";
	medbArray[72]="C2,C3,C4,T10,T11,S2";
	medbArray[73]="C2,C3,C4,T10,T11,S2";
	medbArray[74]="C3,C4,T10,S2";
	medbArray[75]="C1,C2,T11,T12,L1,L2";
	medbArray[76]="C2,C3,C4,T10,T11,S2";
	medbArray[77]="C2,C3,C4,T10,T11,S2";
	medbArray[78]="C1,C2,T11,T12,L1,L2";
	medbArray[79]="L1,L2";
	medbArray[80]="L1,L2";
	medbArray[81]="T5,T6,T7,T8,T11,T12,L1";
	medbArray[82]="C1,T8,T10";
	medbArray[83]="C1,T8,T10";
	medbArray[84]="C2,T9";
	medbArray[85]="T5,T6,T7,T11,T12,L1";
	medbArray[86]="C1,T6,T7,T8,T10,T11,T12";
	medbArray[87]="C1,T7,T8,T10,T11";
	medbArray[88]="T5,T6,T7,T8,T11,T12,L1";
	medbArray[89]="C1,T8,T10";
	medbArray[90]="C1,T8,T10";
	medbArray[91]="C2,T9";
	medbArray[92]="T5,T6,T7,T11,T12,L1";
	medbArray[93]="C1,T6,T7,T8,T10,T11,T12";
	medbArray[94]="C1,T7,T8,T10,T11";
	medbArray[95]="T2,T3,L3,L4";
	medbArray[96]="T2,L4";
	medbArray[97]="T1,L5";
	medbArray[98]="T2,L4";
	medbArray[99]="T3,L3";
	medbArray[100]="T4,L2";
	medbArray[101]="T5,L1";
	medbArray[102]="T1,T2,T3,L3,L4,L5";
	medbArray[103]="T3,T4,T5,T6,T12,L1,L2,L3";
	medbArray[104]="C2,T5,T6,T12,L1,L4";
	medbArray[105]="C1,T3,T4,T10,L2,L3";
	medbArray[106]="C2,T5,T6,T7,T9,T11,T12,L1";
	medbArray[107]="C3,T5,T6,T7,T8,T11,T12,L1";
	medbArray[108]="C4,T5,T6,T7,T8,T11,T12,L1";
	medbArray[109]="C4,T5,T6,T7,T8,T11,T12,L1";
	medbArray[110]="C5,T6,T7,T8,T11,T12";
	medbArray[111]="T5,T7,T8,T11,T12";
	medbArray[112]="T4,T6,T8,T11,T12";
	medbArray[113]="T3,T6,T7,T11,T12";
	medbArray[114]="T2,T6,T7,T8,T11,T12";
	medbArray[115]="T1,T6,T7,T8,T11,T12,L3";
	medbArray[116]="C1,C2,C5,C6,T11";
	medbArray[117]="C4,T5,T6,T7,T11,T12,L1";
	medbArray[118]="C1,C2,T11,T12,L1,L2";
	medbArray[119]="L1,L2";
	medbArray[120]="T1,T2,T3,L3,L4,L5";
	medbArray[121]="T1,T3,L3,L5";
	medbArray[122]="T1,T3,L3,L5";
	medbArray[123]="T1,L5";
	medbArray[124]="T2,T3,L3,L4";
	medbArray[125]="T2,T3,L3,L4";
	medbArray[126]="T2,L4";
	medbArray[127]="T3,L3";
	medbArray[128]="T4,L2";
	medbArray[129]="T5,L1";
	medbArray[130]="T5,T6,T12,L1";
	medbArray[131]="T5,T6,T12,L1";
	medbArray[132]="T5,T6,T7,T11,T12,L1";
	medbArray[133]="T5,T6,T7,T11,T12,L1";
	medbArray[134]="T3,T4,T5,T6,T12,L1,L2,L3";
	medbArray[135]="C1,T5,T6,T10,T12,L1";
	medbArray[136]="C1,T5,T6,T10,T12,L1";
	medbArray[137]="C1,T3,T4,T1O,L2,L3";
	medbArray[138]="C2,T5,T6,T9,T12,L1";
	medbArray[139]="C2,T5,T6,T9,T12,L1";
	medbArray[140]="C2,T5,T6,T7,T9,T11,T12,L1";
	medbArray[141]="C2,T5,T6,T12,L1,L4";
	medbArray[142]="C3,T5,T6,T8,T12,L1";
	medbArray[143]="C3,T5,T6,T8,T12,L1";
	medbArray[144]="C3,T5,T6,T7,T8,T11,T12,L1";
	medbArray[145]="T1,T6,T7,T8,T11,T12,L3";
	medbArray[146]="C4,T5,T6,T7,T12,L1";
	medbArray[147]="C4,T5,T6,T7,T12,L1";
	medbArray[148]="C4,T5,T6,T7,T11,T12,L1";
	medbArray[149]="T6,T12,L1";
	medbArray[150]="T6,T12,L1";
	medbArray[151]="T6,T7,T11,T12,L1";
	medbArray[152]="C5,T6,T7,T8,T11,T12";
	medbArray[153]="T5,T12,L1";
	medbArray[154]="T5,T12,L1";
	medbArray[155]="T5,T7,T11,T12,L1";
	medbArray[156]="T5,T7,T8,T11,T12";
	medbArray[157]="C7,T4,T5,T6,T12,L1";
	medbArray[158]="C7,T4,T5,T6,T12,L1";
	medbArray[159]="T4,T5,T6,T11,T12,L1";
	medbArray[160]="T4,T6,T8,T11,T12";
	medbArray[161]="T4,T5,T6,T11,T12,L1";
	medbArray[162]="T5,T7,T11,T12,L1";
	medbArray[163]="T3,T6,T7,T11,T12";
	medbArray[164]="C5,C8,T2,S1";
	medbArray[165]="C5,C8,T2,S1";
	medbArray[166]="T2,T6,T7,T8,T11,T12";
	medbArray[167]="C4,C5,T1,L3,S1,S2";
	medbArray[168]="C4,C5,T1,L3,S1,S2";
	medbArray[169]="C2,C3,C7,T10";
	medbArray[170]="C2,C3,C7,T10";
	medbArray[171]="C1,C2,C3,C6,T10,T11";
	medbArray[172]="C1,C2,C3,C6,T10,T11";
	medbArray[173]="C1,C2,T11,T12,L1";
	medbArray[174]="C1,C3,C4,C5,T10,T12,S1,S2";
	medbArray[175]="C1,C3,C4,C5,T10,T12,S1,S2";
	medbArray[176]="C1,C2,T11,T12,L1";
	medbArray[177]="C1,C2,C5,C6,T11";
	medbArray[178]="C1,C2,T11,T12,L1,L2";
	medbArray[179]="L1,L2";
	medbArray[180]="L1,L2";
	medbArray[181]="C1,C2,T11,T12,L1,L2";
	medbArray[182]="T6,T7,T11,T12,L1";
	medbArray[183]="C2,T11,L1,L2";
	medbArray[184]="C2,T11,L1,L2";
	medbArray[185]="T2,L4";
	medbArray[186]="T2,T3,L3,L4";
	medbArray[187]="C1,C2,T11,T12,L1,L2";
	medbArray[188]="L1,L2";
	medbArray[189]="C2,C3,C4,T10,T11,S2";
	medbArray[190]="L1,L2";
	medbArray[191]="L1,L2";
	medbArray[192]="C1,C2,T11,T12";
	medbArray[193]="C1,C2,T11,T12";
	medbArray[194]="C5,C6,L5,S1";
	medbArray[195]="C5,C6,L5,S1";
	medbArray[196]="C8,T3";
	medbArray[197]="C8,T3";
	return medbArray[zonID];
}

function returnZonContent_other(zonID){
	var otherArray=new Array();
	otherArray[0]="";
	otherArray[1]="";
	otherArray[2]="";
	otherArray[3]="";
	otherArray[4]="";
	otherArray[5]="";
	otherArray[6]="";
	otherArray[7]="";
	otherArray[8]="";
	otherArray[9]="";
	otherArray[10]="";
	otherArray[11]="";
	otherArray[12]="";
	otherArray[13]="";
	otherArray[14]="";
	otherArray[15]="";
	otherArray[16]="";
	otherArray[17]="";
	otherArray[18]="";
	otherArray[19]="Acromioclavicularled,Costa 1";
	otherArray[20]="";
	otherArray[21]="";
	otherArray[22]="";
	otherArray[23]="";
	otherArray[24]="Acromioclavicularled,Costa 1";
	otherArray[25]="";
	otherArray[26]="";
	otherArray[27]="";
	otherArray[28]="";
	otherArray[29]="Acromioclavicularled,Costa 1,Glenohumeralled";
	otherArray[30]="Acromioclavicularled,Costa 1";
	otherArray[31]="Acromioclavicularled,Costa 1";
	otherArray[32]="Acromioclavicularled,Costa 1";
	otherArray[33]="Acromioclavicularled,Costa 1,Glenohumeralled";
	otherArray[34]="Acromioclavicularled,Costa 1";
	otherArray[35]="Acromioclavicularled,Costa 1";
	otherArray[36]="Acromioclavicularled,Costa 1";
	otherArray[37]="Glenohumeralled";
	otherArray[38]="";
	otherArray[39]="";
	otherArray[40]="Glenohumeralled";
	otherArray[41]="";
	otherArray[42]="";
	otherArray[43]="";
	otherArray[44]="";
	otherArray[45]="";
	otherArray[46]="";
	otherArray[47]="";
	otherArray[48]="";
	otherArray[49]="";
	otherArray[50]="";
	otherArray[51]="";
	otherArray[52]="";
	otherArray[53]="";
	otherArray[54]="";
	otherArray[55]="";
	otherArray[56]="";
	otherArray[57]="";
	otherArray[58]="";
	otherArray[59]="";
	otherArray[60]="";
	otherArray[61]="";
	otherArray[62]="";
	otherArray[63]="";
	otherArray[64]="";
	otherArray[65]="";
	otherArray[66]="";
	otherArray[67]="";
	otherArray[68]="";
	otherArray[69]="";
	otherArray[70]="Höftled,Knäled";
	otherArray[71]="Höftled";
	otherArray[72]="Höftled";
	otherArray[73]="Höftled,Knäled";
	otherArray[74]="";
	otherArray[75]="Prox. tibiofibularled,Dist. tibiofibularled,Fotled,Intertarsalleder,MTP";
	otherArray[76]="Knäled,Fotled";
	otherArray[77]="Knäled,Fotled";
	otherArray[78]="Prox. tibiofibularled,Dist. tibiofibularled,Fotled,Intertarsalleder,MTP";
	otherArray[79]="Fotled,Intertarsalleder,MTP";
	otherArray[80]="Dist. tibiofibularled,Fotled,Intertarsalleder,MTP";
	otherArray[81]="Armbågsled,Prox. radioulnarled,Dist. radioulnarled,Handled,CMC 1";
	otherArray[82]="Armbågsled,Prox. radioulnarled,Dist. radioulnarled";
	otherArray[83]="";
	otherArray[84]="";
	otherArray[85]="Armbågsled,Prox. radioulnarled,Dist. radioulnarled";
	otherArray[86]="Handled,MCP,Interphalangealleder";
	otherArray[87]="Handled,MCP,Interphalangealleder";
	otherArray[88]="Armbågsled,Prox. radioulnarled,Dist. radioulnarled,Handled,CMC 1";
	otherArray[89]="Armbågsled,Prox. radioulnarled,Dist. radioulnarled";
	otherArray[90]="";
	otherArray[91]="";
	otherArray[92]="Armbågsled,Prox. radioulnarled,Dist. radioulnarled";
	otherArray[93]="Handled,MCP,Interphalangealleder";
	otherArray[94]="Handled,MCP,Interphalangealleder";
	otherArray[95]="";
	otherArray[96]="";
	otherArray[97]="";
	otherArray[98]="";
	return otherArray[zonID];
}


function returnZonContent_invart(zonID){
	var invartArray=new Array();
	invartArray[0]="Nothing";
	invartArray[1]="1,2,7,8";
	invartArray[2]="1,2,7,8";
	invartArray[3]="1,2,7,8";
	invartArray[4]="1,2,7,8";
	invartArray[5]="1,2,7,8";
	invartArray[6]="1,2,7,8";
	invartArray[7]="9,2,7,8";
	invartArray[8]="9";
	invartArray[9]="9,2,7,8";
	invartArray[10]="9";
	invartArray[11]="1,2,7,8";
	invartArray[12]="1,2,7,8";
	invartArray[13]="1,2,7,8";
	invartArray[14]="1,2,7,8";
	invartArray[15]="1,2,7,8";
	invartArray[16]="1,2,7,8";
	invartArray[17]="1,2,7,8";
	invartArray[18]="1,2,7,8";
	invartArray[19]="5,6,10";
	invartArray[20]="7,8";
	invartArray[21]="7,8";
	invartArray[22]="7,8";
	invartArray[23]="7,8";
	invartArray[24]="10";
	invartArray[25]="7,8";
	invartArray[26]="7,8";
	invartArray[27]="7,8";
	invartArray[28]="7,8";
	invartArray[29]="5,6,10";
	invartArray[30]="5,6,10";
	invartArray[31]="5,6,10";
	invartArray[32]="5,6,10";
	invartArray[33]="10";
	invartArray[34]="10";
	invartArray[35]="10";
	invartArray[36]="10";
	invartArray[37]="5,6";
	invartArray[38]="4,7,11,21,22,23,8";
	invartArray[39]="3,4,7,11,21,22,23,8";
	invartArray[40]="";
	invartArray[41]="4,7,11,12";
	invartArray[42]="3,4,7,11";
	invartArray[43]="4,7,11,12";
	invartArray[44]="3,4,7,11";
	invartArray[45]="4,12,14,5,6,15";
	invartArray[46]="4,12,14,5,6,15";
	invartArray[47]="3,4,13,14";
	invartArray[48]="3,4,13,14";
	invartArray[49]="12,14,5,6,15";
	invartArray[50]="12,14,5,6,15";
	invartArray[51]="13,14,24,25";
	invartArray[52]="13,14,24,25";
	invartArray[53]="14,5,6,15";
	invartArray[54]="13,14,24";
	invartArray[55]="26,14,5,6,15,27,16";
	invartArray[56]="26,13,14,24,27,16";
	invartArray[57]="26,14,5,6,27,16,17,18,28";
	invartArray[58]="26,13,14,24,27,16,17,28";
	invartArray[59]="26,5,6,27,16,17,18,29,28,30,31,32,35";
	invartArray[60]="26,13,24,27,16,17,29,28,30,31,32";
	invartArray[61]="26,16,17,18,29,28,30,31,32,20,33,35";
	invartArray[62]="26,16,17,29,28,30,31,32,20,33";
	invartArray[63]="17,18,29,28,30,31,32,20,33,35,34";
	invartArray[64]="17,29,28,30,31,32,20,33,19,34";
	invartArray[65]="17,29,28,20,33,35,30,34";
	invartArray[66]="17,29,28,20,33,19,30,34";
	invartArray[67]="17,29,28,20,33,35,30,34";
	invartArray[68]="17,29,28,20,33,19,30,34";
	invartArray[69]="29,28,20,33,30";
	invartArray[70]="29,28,20,33,30,34";
	invartArray[71]="29,28,20,33,30";
	invartArray[72]="29,28,20,33,19,30";
	invartArray[73]="29,28,20,33,19,30,34";
	invartArray[74]="29,28,20,33,19,30";
	invartArray[75]="";
	invartArray[76]="";
	invartArray[77]="";
	invartArray[78]="";
	invartArray[79]="";
	invartArray[80]="";
	invartArray[81]="";
	invartArray[82]="";
	invartArray[83]="";
	invartArray[84]="";
	invartArray[85]="";
	invartArray[86]="";
	invartArray[87]="";
	invartArray[88]="";
	invartArray[89]="3";
	invartArray[90]="3";
	invartArray[91]="3";
	invartArray[92]="";
	invartArray[93]="";
	invartArray[94]="";
	invartArray[95]="2,7,8";
	invartArray[96]="2,7,8";
	invartArray[97]="2,7";
	invartArray[98]="2,7,8";
	invartArray[99]="10";
	invartArray[100]="10";
	invartArray[101]="10";
	invartArray[102]="2,7,8";
	invartArray[103]="10";
	invartArray[104]="3,4,7,11,21,22,23,8";
	invartArray[105]="10,3,4,7,11,21,22,23";
	invartArray[106]="3,4,7,11,21,22,23,8";
	invartArray[107]="3,4,7,11";
	invartArray[108]="3,4,7,11";
	invartArray[109]="3,4,7,11";
	invartArray[110]="3,4,13,14";
	invartArray[111]="13,14,24,25";
	invartArray[112]="13,14,24";
	invartArray[113]="13,14,24,27,16";
	invartArray[114]="13,14,24,27,16,17,28";
	invartArray[115]="13,24,27,16,17,29,28,30,31,32";
	invartArray[116]="17,29,28,30,31,32,20,33,19";
	invartArray[117]="5,6,4,7,11,12";
	invartArray[118]="";
	invartArray[119]="";
	invartArray[120]="2,7,8";
	invartArray[121]="2,7,10";
	invartArray[122]="2,7,5,6,10";
	invartArray[123]="2,7";
	invartArray[124]="2,7,8,10";
	invartArray[125]="2,7,8,5,6,10";
	invartArray[126]="2,7,8";
	invartArray[127]="10";
	invartArray[128]="10";
	invartArray[129]="10";
	invartArray[130]="";
	invartArray[131]="5,6";
	invartArray[132]="";
	invartArray[133]="5,6";
	invartArray[134]="5,6,10";
	invartArray[135]="10,3,4,7,11,21,22,23";
	invartArray[136]="5,6,10,4,7,11,21,22,23";
	invartArray[137]="5,6,10,4,7,11,21,22,23";
	invartArray[138]="3,4,7,11,21,22,23,8";
	invartArray[139]="5,6,4,7,11,21,22,23,8";
	invartArray[140]="5,6,4,7,11,21,22,23,8";
	invartArray[141]="5,6,10,4,7,11,21,22,23,8";
	invartArray[142]="3,4,7,11";
	invartArray[143]="5,6,4,7,11,12";
	invartArray[144]="5,6,4,7,11,12";
	invartArray[145]="5,6,27,16,17,18,29,28,30,31,32,35";
	invartArray[146]="3,4,7,11";
	invartArray[147]="5,6,4,7,11,12";
	invartArray[148]="5,6,4,7,11,12";
	invartArray[149]="3,4,13,14";
	invartArray[150]="4,12,14,5,6,15";
	invartArray[151]="4,12,14,5,6,15";
	invartArray[152]="4,12,14,5,6,15";
	invartArray[153]="13,14,24,25";
	invartArray[154]="12,14,5,6,15";
	invartArray[155]="12,14,5,6,15";
	invartArray[156]="12,14,5,6,15";
	invartArray[157]="13,14,24";
	invartArray[158]="14,5,6,15";
	invartArray[159]="14,5,6,15";
	invartArray[160]="14,5,6,15";
	invartArray[161]="13,14,24";
	invartArray[162]="13,14,24,25";
	invartArray[163]="14,5,6,15,27,16";
	invartArray[164]="26,13,14,24,27,16,17,28,29,20,33,19,30";
	invartArray[165]="26,14,5,6,27,16,17,18,28,29,20,33,35,30";
	invartArray[166]="14,5,6,27,16,17,18,28";
	invartArray[167]="26,13,24,27,16,17,29,28,30,31,32,20,33,19";
	invartArray[168]="26,5,6,27,16,17,18,29,28,30,31,32,20,33,35";
	invartArray[169]="26,16,17,29,28,30,31,32,20,33,19";
	invartArray[170]="26,16,17,18,29,28,30,31,32,20,33,35";
	invartArray[171]="17,29,28,30,31,32,20,33,19";
	invartArray[172]="17,18,29,28,30,31,32,20,33,35";
	invartArray[173]="";
	invartArray[174]="17,29,28,20,33,19,30";
	invartArray[175]="17,29,28,20,33,35,30";
	invartArray[176]="";
	invartArray[177]="17,18,29,28,30,31,32,20,33,35";
	invartArray[178]="28,33,20,19,35,29,30";
	invartArray[179]="28,33,20,19,35,29,30";
	invartArray[180]="28,33,20,19,35,29,30";
	invartArray[181]="28,33,20,19,35,29,30";
	invartArray[182]="3,4,13,14";
	invartArray[183]="28,33,20,19,35,29,30";
	invartArray[184]="28,33,20,19,35,29,30";
	invartArray[185]="2,7,8";
	invartArray[186]="2,7,8";
	invartArray[187]="";
	invartArray[189]="";
	invartArray[190]="";
	invartArray[191]="28,33,20,19,35,29,30";
	invartArray[192]="";
	invartArray[193]="";
	invartArray[194]="17,18,29,28,30,31,32,20,33,35,34";
	invartArray[195]="17,29,28,30,31,32,20,33,19,34";
	invartArray[196]="26,14,5,6,15,27,16";
	invartArray[197]="26,13,14,24,27,16";
	return invartArray[zonID];
}

// ARRAY IMAGE MAP CORDS

function returnZonCords_Male(pos,zonID){
	var zonCordArray=new Array();
	zonCordArray[0]="Nothing";
	
	// FRONT
	if (pos==1){
		zonCordArray[1]="224,2,219,3,212,7,207,7,201,12,196,18,198,26,198,35,199,42,199,47,205,47,213,49,217,50,221,53,216,53,213,51,210,50,206,51,206,53,209,54,213,54,213,55,206,55,210,59,211,65,215,70,221,74,225,74" 
        zonCordArray[2]="224,3,229,3,234,5,240,5,243,7,249,11,253,15,252,29,249,47,241,47,235,49,230,50,228,53,228,53,231,53,234,51,237,50,241,51,242,53,240,54,235,54,235,57,241,55,237,61,234,66,229,73,226,74" 
        zonCordArray[4]="253,14,250,38,250,48,250,51,248,54,244,55,237,62,234,67,230,71,228,75,224,75,224,84,235,84,244,82,246,81,248,75,250,62,253,40" 
        zonCordArray[16]="249,48,246,48,242,51,242,56,246,54,249,52" 
        zonCordArray[15]="242,58,235,58,235,55,242,55" 
        zonCordArray[11]="212,56,212,54,205,54,204,55,205,56" 
        zonCordArray[17]="235,51,240,52,244,54,244,51,248,48,241,48,235,50" 
        zonCordArray[14]="220,54,216,50,212,50,212,51,213,52,216,54" 
        zonCordArray[18]="228,54,231,54,233,52,235,52,235,48,231,50,228,52" 
        zonCordArray[13]="201,48,204,48,212,50,212,51,208,51,204,52,202,51" 
        zonCordArray[12]="198,48,201,48,204,51,205,54,204,56,202,55,198,52" 
        zonCordArray[3]="194,20,197,36,198,51,198,54,205,55,209,60,213,69,219,74,224,75,224,82,215,84,205,82,201,81,198,69,196,45" 
        zonCordArray[5]="195,21,196,42,197,63,200,75,201,81,204,82,224,84,224,103,215,102,205,98,201,94,196,88,189,51,190,33,192,26" 
        zonCordArray[6]="226,84,224,105,234,102,242,96,250,92,253,86,259,48,260,40,259,29,257,21,253,14,253,38,252,48,250,66,249,77,246,81,241,82,230,84" 
        zonCordArray[10]="257,62,259,56,263,59,264,60,261,66,259,67,256,66" 
        zonCordArray[8]="190,62,189,58,185,58,184,60,185,64,189,67,192,67" 
        zonCordArray[9]="257,55,259,51,259,53,264,54,265,57,265,63,263,73,259,82,254,80,256,70,256,66,260,65,263,63,263,59,261,57,259,57"  
        zonCordArray[7]="190,58,191,54,186,56,185,55,184,54,184,63,185,70,187,76,190,78,193,81,192,66,187,65,185,63,185,58,187,57" 
        zonCordArray[27]="226,103,224,128,228,126,233,122,233,109,234,102" 
        zonCordArray[22]="213,102,219,103,224,103,224,128,222,128,215,124" 
        zonCordArray[21]="215,122,213,102,209,99,201,95,207,109,212,118" 
        zonCordArray[26]="234,102,241,96,249,92,242,103,237,117,233,121,233,111" 
        zonCordArray[25]="233,122,240,110,245,98,248,94,253,86,248,116,246,124,240,132,231,143,233,132" 
        zonCordArray[28]="226,128,228,128,233,122,233,134,231,143,226,147" 
        zonCordArray[20]="194,88,201,95,207,110,215,122,216,143,208,132,202,124,198,106" 
        zonCordArray[23]="215,124,220,126,224,128,226,147,219,146,216,142" 
        zonCordArray[19]="194,91,196,132,196,161,209,162,224,162,224,147,220,147,215,142,208,132,202,126,200,116" 
        zonCordArray[24]="253,88,249,113,246,124,240,132,233,142,226,147,226,162,240,161,253,161,253,142" 
        zonCordArray[35]="253,110,252,142,264,140,276,135,274,132,271,121" 
        zonCordArray[34]="271,121,281,128,289,129,297,130,288,132,276,135,274,132" 
        zonCordArray[31]="196,110,196,142,183,139,173,135,175,132,180,121" 
        zonCordArray[30]="173,135,176,132,180,121,168,128,162,131,159,131,165,132" 
        zonCordArray[32]="173,134,183,138,196,142,196,159,183,161,165,162,151,162,161,147,168,139" 
        zonCordArray[29]="151,162,168,139,173,134,160,132,152,134,147,136,142,141,130,146,123,151,118,158,113,162" 
        zonCordArray[36]="253,142,253,161,271,161,292,162,289,153,284,144,280,138,276,135,264,140" 
        zonCordArray[33]="276,135,287,132,299,132,304,132,310,139,322,146,330,151,335,161,315,162,292,162,289,151,284,144" 
        zonCordArray[38]="224,162,194,159,151,162,150,179,180,184,190,184,226,186" 
        zonCordArray[39]="226,162,226,186,259,186,272,183,300,179,292,162,256,161" 
        zonCordArray[41]="150,180,147,187,147,193,147,197,169,200,187,201,226,202,226,186,190,185,173,183" 
        zonCordArray[42]="226,186,226,202,263,201,277,200,288,198,300,195,302,190,302,187,299,180,261,186" 
        zonCordArray[43]="149,197,153,209,162,219,175,223,184,224,226,224,226,204,189,201,169,200" 
        zonCordArray[44]="226,202,226,224,253,224,270,224,280,221,291,216,297,208,297,201,302,197,280,200,253,201" 
        zonCordArray[45]="149,200,150,209,149,223,149,227,150,233,155,234,154,226,154,220,153,209" 
        zonCordArray[49]="150,233,154,246,155,234" 
        zonCordArray[48]="300,197,299,204,302,220,302,224,300,231,293,234,295,227,295,221,295,215,296,209" 
        zonCordArray[52]="295,234,295,246,297,238,300,231" 
        zonCordArray[46]="153,209,162,220,172,222,183,224,226,224,226,245,189,243,175,241,162,239,155,234,154,226,154,220" 
        zonCordArray[47]="226,224,268,224,276,222,284,220,289,216,295,209,295,223,293,234,287,238,276,241,264,242,242,245,226,245" 
        zonCordArray[50]="155,235,162,239,173,241,183,242,197,243,212,245,226,245,226,264,184,262,172,261,162,258,157,257,154,248" 
        zonCordArray[51]="226,245,226,264,246,264,263,262,277,261,287,260,291,258,295,248,295,234,288,238,276,241,263,243,244,245" 
        zonCordArray[53]="157,257,164,260,173,261,183,262,196,262,226,264,226,281,192,279,181,278,172,278,166,275,162,272" 
        zonCordArray[54]="226,264,253,262,268,262,276,261,285,260,291,258,287,272,281,276,275,278,265,279,245,281,226,281" 
        zonCordArray[55]="164,274,169,276,181,279,187,279,200,281,226,281,226,297,202,297,185,296,175,296,168,293,164,293,164,284" 
        zonCordArray[56]="226,281,242,281,256,279,270,278,280,276,287,272,285,282,285,288,287,292,278,294,268,296,255,296,237,299,226,297" 
        zonCordArray[57]="164,293,173,296,185,296,201,297,226,297,226,315,200,315,181,312,166,311,160,310,161,304" 
        zonCordArray[58]="226,297,238,299,250,297,268,296,278,296,287,292,289,310,256,315,245,315,226,315" 
        zonCordArray[59]="160,310,197,315,226,315,226,332,198,330,177,327,160,326,160,319" 
        zonCordArray[60]="226,315,248,315,263,314,277,311,289,310,291,318,289,326,252,330,240,332,226,332" 
        zonCordArray[61]="158,326,192,330,226,332,226,351,208,349,184,346,165,342,155,338,157,332" 
        zonCordArray[62]="226,332,245,332,261,329,276,327,289,326,293,332,295,340,276,345,256,346,237,349,226,351" 
        zonCordArray[63]="155,338,165,344,185,346,205,349,226,351,226,381,207,376,187,366,173,355,161,346,155,341" 
        zonCordArray[64]="226,351,242,349,263,346,276,345,293,340,274,355,257,369,241,375,226,380" 
        zonCordArray[65]="155,341,175,355,187,366,205,376,224,380,224,398,215,396,198,392,180,380,169,369,158,353" 
        zonCordArray[66]="226,380,242,375,260,367,276,353,293,340,289,353,277,371,265,384,244,395,230,396,226,398" 
        zonCordArray[68]="226,396,238,396,252,391,265,384,256,398,242,411,231,418,226,422" 
        zonCordArray[67]="184,384,197,391,207,395,217,396,226,398,226,422,208,413,197,401,189,395" 
        zonCordArray[69]="155,341,151,355,149,374,149,387,147,396,142,418,136,449,133,476,132,494,132,509,132,523,135,539,136,554,139,542,142,513,143,487,146,457,151,429,160,398,162,380,161,360" 
        zonCordArray[70]="160,355,165,363,173,373,181,380,184,383,189,395,197,401,208,413,201,444,193,473,189,493,187,509,189,519,192,528,196,533,189,553,186,568,183,597,181,607,173,618,161,625,153,627,145,627,139,622,136,616,133,611,136,596,136,581,137,567,136,554,139,543,140,530,143,504,146,457,154,416,161,395,162,377" 
        zonCordArray[71]="209,413,200,449,192,479,189,494,189,515,192,524,196,533,209,489,220,455,223,441,224,429,226,422" 
        zonCordArray[72]="226,422,228,436,229,458,233,477,237,494,240,506,241,527,242,527,248,517,250,504,249,487,245,450,244,437,241,411,231,418" 
        zonCordArray[73]="241,411,242,433,245,455,249,488,250,501,249,508,248,516,245,523,242,527,241,527,241,545,242,561,245,572,250,592,252,601,252,609,256,622,261,629,268,636,274,636,277,636,291,626,303,616,300,599,300,590,300,563,300,548,295,535,291,516,291,494,289,468,287,439,284,407,284,380,287,366,289,353,281,363,276,371,265,383,257,396,250,402" 
        zonCordArray[74]="295,340,289,353,285,378,285,406,288,441,291,482,291,510,293,523,295,538,300,548,300,534,304,510,306,483,307,450,304,420,302,401,303,381,299,356" 
        zonCordArray[40]="293,162,314,162,322,162,329,161,335,161,339,170,340,183,341,197,341,201,340,213,350,230,341,230,337,227,322,215,319,208,308,200,302,195,303,190,300,180,296,172" 
        zonCordArray[91]="300,195,299,202,302,213,307,227,306,215,304,206,303,200" 
        zonCordArray[90]="302,197,311,202,319,208,322,215,324,230,324,243,322,253,319,260,315,250,312,241,307,228,306,216,304,205" 
        zonCordArray[88]="350,230,355,243,356,250,366,265,372,276,368,275,363,271,356,261,351,245,350,235" 
        zonCordArray[89]="324,216,337,227,341,230,345,230,350,230,350,239,352,250,356,261,355,271,356,281,365,307,375,340,388,369,394,389,387,389,383,391,382,393,379,378,371,362,356,333,341,308,335,289,330,281,319,261,324,248,324,230" 
        zonCordArray[92]="356,262,355,276,356,281,366,312,380,353,388,370,394,389,407,387,412,387,403,367,390,332,377,289,372,276,367,276,360,270" 
        zonCordArray[88]="413,387,422,395,428,400,434,405,412,395,413,391" 
        zonCordArray[93]="410,387,407,387,395,389,402,401,407,417,410,436,414,461,419,458,416,446,412,436,413,435,431,460,435,457,432,450,423,429,424,428,434,444,440,456,444,453,430,417,438,427,441,426,435,405,424,399,412,395,413,391" 
        zonCordArray[94]="395,389,402,399,406,413,409,433,413,454,412,453,403,435,402,435,410,458,410,460,406,461,392,432,383,407,382,392,386,389" 
        zonCordArray[37]="113,162,109,176,107,186,106,198,106,204,109,215,108,224,99,233,106,231,110,228,125,216,135,206,149,197,147,190,150,180,151,162" 
        zonCordArray[84]="147,197,143,212,142,222,140,230,149,216,150,201" 
        zonCordArray[83]="147,197,135,206,125,217,124,235,124,250,129,262,136,246,142,230,143,215,146,204" 
        zonCordArray[81]="99,233,97,239,94,245,92,250,86,264,81,271,75,278,81,278,89,271,92,264,97,249,99,241" 
        zonCordArray[82]="124,217,112,228,105,231,99,233,99,241,97,249,94,257,92,264,94,275,92,281,88,303,71,344,59,370,52,391,59,391,63,393,65,387,74,365,90,337,105,316,112,302,116,284,122,271,129,264,124,250,124,239,124,228" 
        zonCordArray[85]="92,265,89,271,84,275,80,278,78,278,75,283,70,301,60,330,52,353,47,370,38,381,40,387,38,388,42,388,47,389,52,391,60,365,73,340,88,305,92,281,94,274" 
        zonCordArray[81]="39,390,33,394,26,398,22,401,19,407,33,400,37,398" 
        zonCordArray[86]="40,389,44,389,52,391,50,396,45,409,41,432,34,455,32,454,33,443,34,437,33,435,22,461,17,459,15,453,18,446,25,429,23,428,14,451,9,456,9,454,12,439,15,420,17,422,12,422,11,419,16,408,28,403,34,397" 
        zonCordArray[87]="52,391,58,391,63,393,63,403,60,428,54,439,51,450,45,462,44,455,44,453,45,437,44,436,41,444,38,453,35,460,34,457,45,409,50,396" 
        zonCordArray[75]="132,611,128,632,127,651,127,666,129,693,135,714,139,751,145,775,146,793,144,801,137,808,124,817,112,823,103,825,97,826,94,829,90,830,89,835,94,839,100,838,104,841,133,840,149,832,154,825,158,815,161,798,162,788,154,753,142,707,138,688,138,668,140,638,143,626,137,620" 
        zonCordArray[76]="132,840,147,832,153,825,158,815,161,800,162,790,158,771,151,744,138,688,138,666,143,626,147,627,153,627,165,622,173,616,181,607,180,619,181,632,184,656,186,674,185,689,183,702,180,708,176,743,176,771,177,792,180,806,181,817,181,826,174,834,167,841,152,840" 
        zonCordArray[79]="161,842,168,841,172,837,177,831,181,825,183,831,181,837,179,841,173,842" 
        zonCordArray[77]="256,622,257,633,253,657,252,673,252,684,255,696,257,740,255,771,252,787,252,792,252,801,252,813,261,794,271,767,276,739,281,702,284,689,284,670,281,651,278,636,274,636,267,634,261,629" 
        zonCordArray[78]="252,815,261,794,272,765,276,739,284,693,284,674,282,665,278,636,291,626,303,616,304,625,306,638,307,658,306,673,297,712,288,751,281,779,281,791,285,800,285,809,284,813,284,816,289,823,290,838,281,838,263,838,252,837,250,827" 
        zonCordArray[80]="285,809,291,816,295,821,297,825,299,838,297,837,291,839,291,834,291,825,289,821,284,816,284,813" 

	}
	
	// LEFT
	if (pos==2){
		zonCordArray[95]="219,18,228,20,233,22,236,26,239,35,240,43,240,62,240,72,237,90,230,90,230,72,232,58,232,44,229,40,225,37,219,36" 
        zonCordArray[2]="219,1,208,1,196,2,183,6,175,11,170,17,165,21,163,36,159,47,160,53,151,69,151,73,153,76,157,76,171,62,167,62,167,58,172,57,165,51,175,51,176,51,179,51,183,39,185,29,192,21,200,18,219,18" 
        zonCordArray[9]="214,63,212,62,211,43,214,41,217,38,222,39,228,41,232,46,233,50,232,72,230,92,230,107,230,111,214,111,219,87,207,87,210,78,211,71,217,71,218,70,219,67,219,64,218,63,214,63" 
        zonCordArray[97]="239,86,239,81,240,81,243,81,241,86,239,86" 
        zonCordArray[98]="237,86,241,86,241,92,237,92,239,86" 
        zonCordArray[99]="230,92,241,92,240,97,230,97,230,92" 
        zonCordArray[100]="230,97,240,98,240,104,230,104" 
        zonCordArray[101]="230,104,240,104,243,111,232,111" 
        zonCordArray[4]="199,23,192,23,188,27,183,41,179,56,157,78,157,82,156,85,156,86,159,87,167,87,184,83,195,75,196,68,199,43" 
        zonCordArray[6]="199,22,197,42,197,60,196,71,195,75,189,81,182,85,167,87,159,87,156,90,159,93,160,94,159,100,159,107,160,108,164,108,179,107,199,100,204,93,211,72,214,63,212,60,212,42,214,41,217,38,219,38,219,20" 
        zonCordArray[10]="214,63,218,63,219,64,219,67,217,71,212,71,214,64" 
        zonCordArray[102]="165,108,185,107,200,100,196,104,184,111,182,112,174,110" 
        zonCordArray[26]="207,90,204,94,200,101,192,107,185,111,195,122,200,112,203,108,204,101" 
        zonCordArray[27]="185,111,182,112,184,121,190,127,195,122,189,116" 
        zonCordArray[25]="207,87,204,100,203,108,195,122,196,130,196,136,197,145,203,140,204,136,219,87" 
        zonCordArray[28]="195,122,190,127,192,130,192,133,193,136,195,140,195,148,197,146,196,130" 
        zonCordArray[19]="195,144,188,146,183,151,180,155,174,165,170,171,178,167,186,155,195,148" 
        zonCordArray[24]="214,112,204,136,201,141,197,146,195,149,188,155,178,167,192,162,204,145,214,126,221,112" 
        zonCordArray[35]="222,111,205,145,218,140,225,130,230,125,233,122,232,111" 
        zonCordArray[34]="219,140,226,129,234,117,238,136,229,138" 
        zonCordArray[36]="192,162,205,145,217,141,214,151,211,159" 
        zonCordArray[33]="212,159,215,149,219,140,239,136,246,153,226,156" 
        zonCordArray[103]="232,111,236,123,240,136,246,153,283,153,279,146,264,131,251,116,247,111" 
        zonCordArray[104]="243,155,280,153,283,160,286,167,261,169,254,167,247,163,244,159" 
        zonCordArray[38]="170,171,164,180,159,190,167,186,172,175,176,167" 
        zonCordArray[39]="178,167,193,162,211,159,208,167,207,174,185,181,167,188,174,175" 
        zonCordArray[40]="211,159,208,167,207,174,207,177,207,182,217,193,222,199,250,210,262,211,273,210,286,204,293,196,286,192,286,181,288,173,286,167,262,169,254,167,246,162,243,155" 
        zonCordArray[41]="159,190,153,200,153,207,153,211,153,211,160,211,160,203,163,195,167,188" 
        zonCordArray[42]="167,188,207,174,207,180,210,185,214,190,196,197,174,205,160,210,163,195" 
        zonCordArray[43]="153,211,153,221,153,222,153,230,156,230,159,211" 
        zonCordArray[44]="160,210,185,201,214,190,210,193,207,197,205,207,205,214,200,215,195,219,183,226,174,229,163,230,157,230" 
        zonCordArray[109]="214,190,208,193,205,200,204,205,204,214,233,203,219,199,215,195" 
        zonCordArray[46]="153,230,153,236,153,240,153,245,153,248,157,248,156,243,156,234,157,230" 
        zonCordArray[47]="157,230,174,230,179,229,185,225,196,219,200,217,205,214,207,222,208,230,208,233,179,243,157,249,156,240" 
        zonCordArray[50]="153,249,153,252,155,259,153,264,156,267,156,270,159,269,160,269,159,263,159,252,157,249" 
        zonCordArray[51]="157,248,182,241,208,233,211,241,214,247,215,251,218,252,196,259,176,264,160,269,159,260" 
        zonCordArray[48]="205,214,233,203,233,224,208,233,207,222" 
        zonCordArray[110]="234,224,233,203,241,207,251,210,255,217" 
        zonCordArray[52]="208,233,233,224,234,247,218,252,214,251,214,247,211,241" 
        zonCordArray[111]="233,224,255,217,268,239,234,247" 
        zonCordArray[112]="234,247,236,267,263,259,270,240,268,239" 
        zonCordArray[113]="236,268,237,287,258,283,261,272,261,264,265,259" 
        zonCordArray[114]="237,287,240,307,257,304,258,291,258,283" 
        zonCordArray[115]="240,307,240,327,255,322,255,311,257,304" 
        zonCordArray[54]="234,247,197,259,160,269,161,277,161,283,163,288,182,284,201,278,229,269,236,268" 
        zonCordArray[56]="163,289,167,307,197,299,237,287,236,268,196,280" 
        zonCordArray[53]="156,270,160,269,161,276,161,283,163,288,159,288,159,277" 
        zonCordArray[55]="159,289,160,293,161,296,161,299,164,307,167,307,163,289" 
        zonCordArray[57]="165,307,167,307,170,315,170,321,167,321,167,314" 
        zonCordArray[58]="167,307,237,287,239,307,217,313,195,317,179,319,170,321" 
        zonCordArray[59]="165,321,170,321,170,335,167,336,167,331,167,324" 
        zonCordArray[60]="170,321,195,317,217,313,240,307,240,327,222,329,197,332,185,335,170,336" 
        zonCordArray[61]="167,336,167,339,165,342,165,350,167,355,168,347,170,336" 
        zonCordArray[88]="251,210,261,211,270,211,279,207,286,204,288,214,295,224,306,240,315,249,324,255,330,258,332,262,334,264,327,293,322,324,315,348,311,370,306,387,303,383,295,379,290,377,290,374,286,373,286,365,284,361,279,358,283,354,290,351,297,347,299,340,306,319,306,303,306,287,305,278,301,272,298,267,293,263,286,260,279,252,270,240,261,225" 
        zonCordArray[92]="302,273,305,277,306,284,306,287,307,300,306,313,306,319,299,342,302,318,302,300,302,284" 
        zonCordArray[90]="293,196,286,204,288,214,295,225,303,234,307,241,317,251,324,255,330,256,327,248,317,233,306,217,298,204" 
        zonCordArray[89]="334,264,327,298,320,328,315,348,317,350,320,351,322,347,323,340,327,327,330,307,334,287,334,276" 
        zonCordArray[93]="279,359,276,363,274,372,272,379,273,380,278,380,282,376,286,373,286,365,284,361" 
        zonCordArray[93]="290,379,286,387,283,392,282,394,273,402,273,406,273,409,269,411,268,416,268,418,279,414,274,418,273,421,273,424,276,420,284,416,295,406,302,398,306,392,306,386,301,381,295,379" 
        zonCordArray[94]="273,424,274,425,284,418,290,414,294,411,291,416,290,418,294,422,302,410,307,399,311,394,315,379,317,367,322,351,315,348,311,367,307,384,306,391,303,394,298,402,290,411" 
        zonCordArray[62]="170,336,195,333,211,331,222,329,240,327,255,324,255,328,258,332,261,333,263,336,263,340,229,347,167,354,168,346" 
        zonCordArray[64]="167,355,225,347,170,374,167,363" 
        zonCordArray[66]="170,374,224,347,228,347,214,361,196,375,183,384,170,395,170,384" 
        zonCordArray[68]="170,395,170,405,174,411,175,417,180,422,185,425,188,425,196,375,182,386" 
        zonCordArray[116]="240,346,263,340,265,351,269,361,274,372,272,377,251,377" 
        zonCordArray[73]="196,375,214,361,211,381,207,411,204,449,204,482,207,537,210,558,214,582,214,592,217,593,217,613,214,623,211,628,207,630,196,631,195,623,195,616,192,608,189,590,188,580,186,558,183,535,183,519,182,505,183,470,185,438,188,425,192,403" 
        zonCordArray[194]="251,377,272,377,272,379,273,380,278,380,279,379,280,386,280,394,273,403,273,406,273,409,268,413,268,416,268,418,279,414,274,421,273,424,272,428,261,402" 
        zonCordArray[74]="214,361,228,347,240,346,251,377,272,429,268,475,265,505,261,524,254,546,248,565,245,578,243,583,240,589,230,593,217,594,214,592,214,580,208,546,204,491,204,446,207,406,211,380" 
        zonCordArray[118]="232,593,237,592,243,584,245,579,244,597,245,613,239,600" 
        zonCordArray[78]="217,593,228,593,230,593,240,601,243,608,245,613,248,624,248,639,245,652,244,681,243,719,244,740,245,784,245,796,242,802,238,806,234,809,224,812,205,817,178,825,166,830,158,832,157,833,155,835,154,839,152,837,153,839,146,836,141,827,156,825,179,819,204,807,216,799,220,776,216,752,207,712,201,687,201,660,197,638,196,630,207,630,210,628,214,623,217,616,217,605" 
        zonCordArray[80]="248,627,249,622,258,647,260,666,261,683,258,703,255,729,255,763,255,788,261,808,265,815,258,823,256,830,250,840,201,838,182,838,155,838,155,832,166,830,178,826,195,820,219,813,230,811,238,807,241,803,243,799,245,801,244,758,243,701,244,676,245,653" 
        zonCordArray[119]="264,816,267,825,267,831,266,835,262,838,250,839,259,823" 
        zonCordArray[70]="174,416,178,421,183,424,188,425,185,442,182,483,182,517,183,534,185,556,186,578,189,590,192,605,195,615,195,627,192,628,182,627,168,624,170,616,170,608,167,604,167,594,163,582,161,558,163,531,165,505,167,468,170,442,171,428" 
        zonCordArray[76]="168,624,179,627,188,628,193,628,195,627,197,638,200,659,201,675,203,694,204,703,208,723,211,740,207,756,203,777,202,794,205,806,144,835,141,829,157,820,162,810,170,796,170,775,170,754,170,725,168,679,170,648,170,634" 
        zonCordArray[75]="170,769,171,787,170,795,161,810,153,825,141,828,142,833,146,837,132,837,124,839,116,839,107,837,101,837,94,829,99,826,105,825,122,820,138,814,151,807,160,801,165,789" 
        zonCordArray[96]="219,1,219,9,219,18,228,20,234,24,237,32,240,39,240,44,240,60,240,69,237,79,241,77,244,70,246,65,250,57,251,47,248,36,247,25,245,18,240,10,230,5,225,2" 
        zonCordArray[17]="165,55,175,55,172,59" 
        zonCordArray[15]="168,62,167,64,171,64,171,60" 
        zonCordArray[16]="172,59,176,53,179,53,179,56,171,64" 
	}
	
	//RIGHT
	if (pos==3){
		zonCordArray[12]="255,52,257,52,262,57,262,63,256,57" 
       zonCordArray[11]="262,57,264,59,266,63,262,63,262,61" 
       zonCordArray[13]="259,52,267,52,262,56" 
       zonCordArray[1]="213,0,213,19,239,20,242,20,245,24,251,38,255,50,257,50,259,52,268,50,266,55,262,56,264,59,266,63,262,63,276,76,280,76,282,74,282,70,274,53,275,48,267,20,262,14,253,7,242,3,228,0" 
       zonCordArray[78]="265,770,264,781,265,796,269,807,282,826,292,829,292,833,286,838,308,838,319,836,325,837,332,836,338,830,338,828,328,825,315,821,305,815,289,810,278,804,272,797" 
       zonCordArray[77]="239,630,239,631,251,631,264,629,263,657,264,696,264,737,264,750,265,795,269,807,279,822,291,830,260,818,245,815,230,807,231,794,231,773,225,731,228,710,232,681,235,649" 
       zonCordArray[79]="171,816,168,824,168,831,169,838,173,839,184,839,179,831" 
       zonCordArray[188]="184,630,178,649,174,663,174,681,174,700,177,729,178,762,177,794,172,810,169,818,181,834,186,839,199,838,246,838,257,840,263,839,273,838,271,833,262,830,250,826,236,824,219,820,199,814,191,812,187,806,188,777,190,733,190,691,187,662,184,640" 
       zonCordArray[75]="202,599,194,605,188,618,184,630,184,640,187,656,190,682,190,715,190,751,187,784,187,796,186,805,187,809,195,813,210,818,226,821,252,827,265,830,272,833,275,838,274,836,280,838,280,840,284,839,288,838,291,830,265,819,248,816,230,808,221,800,215,791,217,770,220,744,228,711,231,692,232,670,235,649,239,634,226,634,219,629,217,622,217,605,217,599" 
       zonCordArray[73]="245,427,246,443,249,464,251,483,249,524,246,554,246,568,245,581,243,594,242,607,239,622,239,630,242,631,249,631,260,630,264,629,264,618,264,611,266,607,266,594,270,578,271,556,270,531,267,490,266,462,263,443,262,428,260,416,255,421" 
       zonCordArray[70]="219,362,228,372,237,377,239,397,245,427,248,451,251,489,251,520,248,549,245,561,246,576,245,586,243,594,242,605,241,614,239,622,239,633,226,634,220,629,217,622,216,619,217,599,219,593,223,568,226,539,228,502,228,460,228,423,224,394,223,380" 
       zonCordArray[187]="202,597,195,593,190,586,187,582,188,597,187,610,187,618,192,607,196,601" 
       zonCordArray[69]="194,346,205,347,213,355,219,362,223,386,227,419,228,460,228,507,224,553,223,567,220,586,217,599,216,599,209,599,202,597,196,596,190,588,188,581,182,559,177,541,171,520,166,489,163,460,162,428,169,413,181,381,187,361" 
       zonCordArray[193]="164,378,182,379,167,417,165,421,162,430,159,424,159,421,158,420,154,416,159,417,163,420,166,420,166,416,165,413,162,408,161,405,155,399,152,395,152,387,153,381,155,383,157,380" 
       zonCordArray[177]="170,342,182,343,194,346,190,358,182,379,164,378,163,368,166,355" 
       zonCordArray[67]="237,377,251,387,263,397,262,405,260,416,255,421,246,425,245,427,239,401" 
       zonCordArray[65]="205,347,209,347,226,357,245,366,264,377,264,397,246,384,230,372,217,361" 
       zonCordArray[63]="209,347,237,353,266,357,266,361,264,369,264,377,245,366,223,355" 
       zonCordArray[85]="131,273,134,281,133,292,133,319,136,341,129,324,127,314,126,294,129,280" 
       zonCordArray[82]="110,353,115,350,117,350,110,318,100,266,98,273,98,288,104,312,109,336" 
       zonCordArray[87]="117,350,123,376,126,389,129,394,133,402,140,409,151,417,159,423,159,425,156,424,148,420,137,412,141,416,142,420,140,423,138,421,126,401,122,397,119,383,119,374,110,354,115,350" 
       zonCordArray[86]="145,376,152,390,154,398,161,405,162,408,166,416,166,420,163,420,154,415,159,421,159,424,155,421,140,410,133,401,129,393,127,387,133,383,138,380" 
       zonCordArray[86]="156,357,159,364,162,372,165,378,162,379,157,379,155,375,151,372,149,366,151,360,152,359" 
       zonCordArray[81]="149,202,155,208,164,209,174,209,182,208,175,223,164,240,160,243,154,251,148,255,142,262,136,265,134,271,131,276,128,284,127,295,127,313,128,316,132,332,138,342,146,347,154,351,157,356,153,360,150,360,147,365,149,373,142,376,145,379,138,379,134,382,127,388,122,367,114,332,107,297,99,265,101,261,102,255,109,254,116,251,127,238,136,224,145,213" 
       zonCordArray[83]="140,196,148,203,142,215,134,228,126,239,116,251,108,256,102,256,108,243,117,230,130,214,134,203" 
       zonCordArray[62]="264,338,266,338,266,342,267,346,267,353,266,357,264,348" 
       zonCordArray[61]="178,324,176,332,173,333,170,338,170,342,194,346,216,348,243,354,266,357,264,350,264,338,220,332,195,328" 
       zonCordArray[60]="264,321,267,321,267,328,266,333,266,338,264,338" 
       zonCordArray[59]="195,307,219,313,245,318,264,321,264,338,248,335,221,332,202,329,194,327" 
       zonCordArray[145]="177,303,195,307,194,327,178,324,178,313" 
       zonCordArray[58]="266,307,268,307,266,310,266,316,267,321,264,321,264,313" 
       zonCordArray[57]="195,288,232,298,266,307,264,314,264,321,251,320,219,313,195,307" 
       zonCordArray[166]="174,284,195,288,195,307,177,303,176,291" 
       zonCordArray[56]="271,289,275,289,274,295,270,302,268,307,266,307,268,298" 
       zonCordArray[55]="196,269,228,278,252,285,270,289,266,307,228,295,195,288" 
       zonCordArray[163]="167,261,196,267,195,288,174,284,173,270" 
       zonCordArray[54]="274,270,277,272,275,277,275,281,275,289,270,289,272,280" 
       zonCordArray[53]="199,248,235,259,253,266,270,270,274,270,272,277,272,284,271,289,245,284,209,272,196,267" 
       zonCordArray[51]="275,250,281,250,281,252,278,255,277,258,277,266,277,272,274,269,274,261" 
       zonCordArray[50]="224,233,246,241,262,244,275,250,275,256,274,263,274,269,270,270,246,265,224,256,214,252,217,252,220,248,223,243" 
       zonCordArray[49]="199,224,224,233,223,241,220,248,217,251,216,252,198,247" 
       zonCordArray[160]="165,239,163,241,165,246,166,254,167,259,196,267,198,247,181,243" 
       zonCordArray[156]="177,217,171,226,165,239,181,243,198,247,199,235,199,224,187,221" 
       zonCordArray[152]="182,209,178,217,188,221,199,224,199,213,199,202,191,204" 
       zonCordArray[45]="201,202,215,209,227,213,227,221,224,229,224,233,199,224,199,213" 
       zonCordArray[46]="275,230,264,230,257,229,249,225,242,222,237,218,228,213,227,224,224,229,224,233,245,241,262,246,275,250,276,241" 
       zonCordArray[47]="275,229,276,237,276,241,275,248,281,248,281,244,281,240,280,236,278,229" 
       zonCordArray[44]="274,209,277,209,281,210,281,214,281,221,280,224,278,228,278,229,275,229,275,221" 
       zonCordArray[117]="201,202,210,198,215,195,220,190,223,192,226,198,227,204,228,213" 
       zonCordArray[43]="220,190,252,202,274,210,275,230,262,230,257,229,252,228,243,222,237,218,231,214,227,213,228,203,227,198,224,194" 
       zonCordArray[42]="266,186,275,190,277,196,280,203,281,209,274,209,272,198,270,194" 
       zonCordArray[41]="227,174,266,186,271,196,274,204,274,209,256,203,234,195,220,190,226,182,227,178" 
       zonCordArray[39]="257,167,263,171,270,181,275,190,266,186,262,177" 
       zonCordArray[38]="223,158,241,163,255,167,262,177,266,186,246,179,226,174,224,167" 
       zonCordArray[37]="191,153,207,155,223,158,226,167,227,175,227,179,223,186,216,195,213,198,195,203,182,209,173,210,156,209,146,202,139,197,145,192,148,184,145,174,145,170,146,167,159,167,170,169,178,167,184,163,188,159" 
       zonCordArray[141]="152,152,171,152,191,153,190,156,186,163,178,166,170,169,158,167,148,167,151,159" 
       zonCordArray[134]="188,110,202,110,199,121,195,134,191,152,181,152,162,152,152,152,155,144,170,132,178,123" 
       zonCordArray[29]="195,134,203,136,210,137,216,140,219,148,223,158,206,155,190,153,194,143" 
       zonCordArray[32]="216,140,228,143,235,153,241,163,232,160,223,158,220,149" 
       zonCordArray[30]="199,121,195,134,199,134,206,136,215,138,209,130,203,125" 
       zonCordArray[31]="201,110,212,110,217,123,223,134,227,143,220,141,216,138,209,130,203,125,199,121" 
       zonCordArray[24]="239,143,245,145,249,148,252,152,257,159,263,171,255,167,246,155,239,147" 
       zonCordArray[129]="194,101,202,101,202,107,201,110,190,110,191,106" 
       zonCordArray[128]="194,96,202,96,202,101,194,100,194,97" 
       zonCordArray[127]="192,90,202,90,202,96,194,96,194,93" 
       zonCordArray[126]="191,85,195,85,195,90,194,90,194,87" 
       zonCordArray[123]="195,78,191,79,191,82,192,85,195,85,195,82" 
       zonCordArray[19]="212,110,220,132,231,148,241,162,255,167,248,156,239,148,235,143,230,138,228,134,220,110" 
       zonCordArray[23]="239,121,243,126,242,127,242,132,239,136,239,140,239,147,237,145,237,130,238,123" 
       zonCordArray[22]="248,110,252,111,249,115,248,119,245,122,243,125,239,119" 
       zonCordArray[20]="214,87,227,87,227,89,230,101,231,108,232,111,239,119,238,125,237,132,237,144,232,141,228,134,224,125,220,110,217,96" 
       zonCordArray[21]="227,89,230,104,231,108,235,112,239,119,243,114,248,110,239,104,232,96" 
       zonCordArray[120]="231,94,235,97,243,101,266,108,262,110,255,110,252,111,242,106,237,101" 
       zonCordArray[8]="219,61,214,61,213,66,214,67,216,70,219,70,220,70" 
       zonCordArray[7]="220,61,220,46,220,41,217,37,210,35,205,38,202,42,201,50,201,63,202,79,202,93,202,104,202,110,220,110,213,87,227,87,220,70,217,70,216,70,214,67,213,66,213,63" 
       zonCordArray[5]="213,19,220,19,234,20,235,34,235,52,238,68,239,74,245,79,263,87,275,87,275,87,275,90,274,93,275,101,274,106,268,108,264,108,246,104,235,97,228,92,221,70,219,61,220,61,220,45,219,40,217,37,213,37" 
       zonCordArray[185]="213,19,206,20,201,20,195,26,195,35,194,48,194,63,195,79,195,90,202,90,201,72,201,50,202,42,206,38,209,35,213,35" 
       zonCordArray[3]="234,20,242,20,245,26,251,35,252,42,253,49,255,56,275,76,275,81,275,83,275,86,266,87,253,83,243,79,238,72,235,50,234,31" 
       zonCordArray[186]="213,0,203,3,195,8,187,18,184,29,182,41,182,55,186,63,187,67,190,75,191,78,195,79,194,64,194,50,195,34,196,24,202,20,206,20,213,19" 

	}
	
	//BACK
	if (pos==4){
		zonCordArray[186]="226,0,237,3,244,8,249,12,251,13,248,18,245,26,244,43,244,85,233,85,225,85" 
        zonCordArray[185]="250,13,257,22,259,30,259,42,259,56,258,64,255,75,255,82,253,94,241,94,243,46,243,30,245,20,247,16" 
        zonCordArray[123]="232,85,232,89,243,87,243,83" 
        zonCordArray[122]="224,83,224,87,230,87,230,82" 
        zonCordArray[125]="225,89,225,93,232,93,232,89" 
        zonCordArray[126]="232,89,243,89,243,94,225,96,225,93,232,93" 
        zonCordArray[98]="224,96,207,96,207,89,217,89,217,93,224,93" 
        zonCordArray[97]="207,87,217,89,217,83,207,82" 
        zonCordArray[124]="217,89,224,89,224,93,217,93" 
        zonCordArray[121]="217,85,224,85,224,89,217,89" 
        zonCordArray[127]="225,96,224,102,253,102,253,96" 
        zonCordArray[128]="224,104,253,102,251,107,224,107" 
        zonCordArray[129]="224,108,253,109,253,113,224,113" 
        zonCordArray[95]="207,94,207,71,207,49,205,30,204,20,200,15,197,13,195,19,192,24,189,33,189,42,190,56,190,58,193,67,196,82,196,94" 
        zonCordArray[710]="259,56,259,53,261,53,263,58,263,65,262,71,259,79,255,81,258,68" 
        zonCordArray[910]="190,56,188,53,184,54,182,60,184,65,184,72,190,81,195,81,193,67" 
        zonCordArray[99]="196,96,224,96,224,102,196,102" 
        zonCordArray[100]="224,107,224,104,196,102,196,108" 
        zonCordArray[101]="196,108,224,108,224,113,196,113" 
        zonCordArray[96]="197,12,201,9,207,5,214,3,218,1,225,0,224,83,207,82,207,46,207,35,204,27,203,19" 
        zonCordArray[130]="196,113,195,123,224,123,224,113" 
        zonCordArray[131]="224,113,224,122,254,123,253,115" 
        zonCordArray[132]="196,123,195,132,199,132,207,132,224,131,224,123" 
        zonCordArray[133]="224,123,254,123,255,134,244,132,224,131" 
        zonCordArray[135]="201,132,200,143,212,142,224,142,224,132,212,132" 
        zonCordArray[136]="224,132,224,142,233,143,245,143,244,132,233,132" 
        zonCordArray[103]="196,113,195,132,186,134,175,137,170,141,164,145,143,149,130,152,121,153,128,148,135,145,139,143,146,137,153,132,164,131,174,128,185,119" 
        zonCordArray[105]="165,145,171,141,176,137,184,135,195,132,201,132,200,143,184,143" 
        zonCordArray[137]="244,132,245,143,266,145,286,148,283,143,279,139,268,135,259,135" 
        zonCordArray[134]="253,115,283,131,284,131,294,132,303,137,308,143,315,144,320,148,327,152,330,156,306,151,286,148,284,144,280,141,273,137,261,134,255,132" 
        zonCordArray[141]="286,148,287,166,313,168,338,174,335,166,334,159,330,156,309,152" 
        zonCordArray[140]="245,143,266,145,286,149,288,166,266,163,245,160" 
        zonCordArray[139]="244,143,233,143,224,143,222,159,245,160" 
        zonCordArray[138]="200,143,224,142,224,159,199,159" 
        zonCordArray[106]="164,145,180,143,200,143,199,159,182,160,161,163" 
        zonCordArray[104]="164,146,139,151,121,153,116,163,110,172,130,168,146,166,161,163" 
        zonCordArray[40]="110,172,130,168,161,163,157,179,153,197,146,198,131,204,121,212,110,218,107,208,107,193,109,179" 
        zonCordArray[107]="161,163,180,160,199,159,199,176,178,178,157,181" 
        zonCordArray[142]="199,159,224,159,222,175,199,176" 
        zonCordArray[143]="224,159,245,160,245,176,222,176" 
        zonCordArray[144]="246,160,268,163,287,166,288,181,268,179,246,176" 
        zonCordArray[37]="287,166,309,168,338,175,338,185,340,198,338,212,338,218,328,213,319,209,306,204,293,200,290,191,288,181,288,172" 
        zonCordArray[148]="245,176,266,179,288,181,293,200,270,197,257,197,245,196" 
        zonCordArray[147]="245,176,222,176,222,196,245,196" 
        zonCordArray[146]="199,176,199,196,222,196,224,176" 
        zonCordArray[108]="157,181,174,179,185,176,199,176,199,196,182,196,167,197,155,197" 
        zonCordArray[182]="155,197,155,206,157,215,174,213,188,213,199,212,199,194,178,196" 
        zonCordArray[110]="155,200,157,215,150,215,153,208" 
        zonCordArray[111]="150,216,147,233,147,235,163,233,157,215" 
        zonCordArray[162]="157,215,163,233,180,230,199,230,199,212,179,213" 
        zonCordArray[149]="199,196,222,196,222,212,199,213" 
        zonCordArray[153]="199,213,222,213,222,230,199,230" 
        zonCordArray[150]="222,196,245,196,245,213,222,213" 
        zonCordArray[154]="224,213,245,213,245,230,224,230" 
        zonCordArray[151]="245,197,268,197,293,200,290,212,290,215,274,215,245,213" 
        zonCordArray[152]="293,200,290,215,299,218,297,212" 
        zonCordArray[155]="245,213,269,215,290,216,283,234,268,233,245,230" 
        zonCordArray[156]="290,216,299,218,299,220,302,227,302,233,299,237,283,234" 
        zonCordArray[112]="147,235,153,242,153,248,153,255,164,253,161,233" 
        zonCordArray[161]="161,233,180,230,199,230,200,248,182,249,164,252" 
        zonCordArray[157]="200,230,222,230,222,248,200,248" 
        zonCordArray[158]="224,230,245,230,245,248,222,248" 
        zonCordArray[159]="245,230,268,233,283,234,283,253,245,248" 
        zonCordArray[160]="283,235,299,238,293,255,283,252" 
        zonCordArray[113]="153,255,157,274,164,274,164,253" 
        zonCordArray[196]="164,252,185,249,201,248,222,248,222,267,196,268,180,270,164,272" 
        zonCordArray[195]="222,248,245,248,283,252,283,274,272,271,255,270,237,267,222,267" 
        zonCordArray[163]="283,253,293,255,287,274,283,272" 
        zonCordArray[114]="157,274,164,272,163,286" 
        zonCordArray[164]="164,272,179,271,196,268,222,267,222,287,201,288,184,289,171,292,163,294,163,286" 
        zonCordArray[167]="163,296,161,304,159,314,176,311,196,308,212,307,222,305,222,288,201,288,185,289,174,292" 
        zonCordArray[169]="159,314,157,327,157,331,157,335,178,330,193,327,210,324,221,323,222,305,203,308,185,308" 
        zonCordArray[171]="221,324,203,326,188,329,157,335,192,335" 
        zonCordArray[174]="222,324,221,359,218,359,214,363,214,364,184,364,184,352,185,345,188,339,189,335,193,335" 
        zonCordArray[173]="168,335,168,341,167,348,159,363,184,364,184,349,185,344,188,335,182,335" 
        zonCordArray[116]="156,335,155,339,153,348,153,352,151,363,159,363,167,344,168,335,164,335" 
        zonCordArray[194]="151,363,159,363,147,394,147,382" 
        zonCordArray[178]="147,396,153,398,153,405,153,409,157,419,164,424,171,415,174,412,178,411,182,409,212,409,210,404,207,396,205,385,207,377,210,370,212,364,184,364,160,363" 
        zonCordArray[183]="212,411,214,413,218,416,221,416,222,432,204,432,182,432,176,432,171,428,167,427,164,424,171,415,174,412,180,409,196,409" 
        zonCordArray[165]="222,268,241,268,259,270,276,272,283,274,284,286,284,296,272,292,248,289,233,287,224,287" 
        zonCordArray[166]="283,274,287,274,284,286" 
        zonCordArray[168]="222,288,236,288,248,289,263,290,283,296,287,316,269,311,246,308,233,307,222,305" 
        zonCordArray[170]="222,305,239,307,258,309,272,312,287,316,288,324,288,335,270,330,250,327,233,324,221,323" 
        zonCordArray[172]="224,324,236,324,250,327,263,330,279,334,288,335,255,335" 
        zonCordArray[175]="222,324,255,335,259,338,259,346,261,352,261,359,261,363,232,364,228,360,225,359,221,359" 
        zonCordArray[176]="257,335,279,335,279,338,282,346,287,363,274,363,261,363,261,352,259,346,259,339,259,337" 
        zonCordArray[177]="279,335,288,335,291,338,291,342,291,346,297,363,287,363,282,344,280,338" 
        zonCordArray[193]="286,363,297,363,298,368,299,374,302,390" 
        zonCordArray[181]="232,364,247,364,261,363,287,363,302,393,295,405,286,424,282,416,274,412,270,409,233,409,236,401,240,394,240,385,240,377,236,370" 
        zonCordArray[184]="233,411,250,409,269,409,274,412,278,415,282,419,286,424,282,427,276,428,268,431,246,432,222,432,221,416,226,415,229,413" 
        zonCordArray[179]="221,359,221,416,215,413,211,407,207,398,207,392,207,382,208,374,212,367,214,363,217,360" 
        zonCordArray[180]="222,359,228,360,233,366,237,373,240,379,240,389,239,397,234,405,230,412,226,415,221,416" 
        zonCordArray[71]="226,432,247,431,247,451,247,474,245,490,244,501,243,511,236,492,230,472,226,457,225,442" 
        zonCordArray[72]="204,432,219,432,221,440,221,451,219,464,216,473,213,486,211,495,210,511,207,493,204,475,203,460,204,444" 
        zonCordArray[69]="302,393,299,397,295,405,293,419,293,436,294,453,297,463,301,485,306,515,312,560,316,538,319,519,319,503,316,478,309,448,306,422,303,409" 
        zonCordArray[74]="147,396,149,407,147,422,145,437,143,451,141,471,142,490,145,514,147,534,150,551,153,515,153,486,155,451,155,433,155,419,153,409,153,401,151,397" 
        zonCordArray[118]="155,412,160,419,164,424,171,430,178,432,188,432,204,432,203,451,204,485,207,498,210,511,207,521,205,533,205,546,202,570,201,580,197,590,196,598,195,610,188,616,182,626,174,644,168,659,164,641,157,627,149,605,149,577,150,551,153,523,153,503,153,470,155,436" 
        zonCordArray[78]="149,602,153,619,153,634,153,644,153,654,150,660,150,675,153,699,155,715,167,774,174,788,173,791,171,796,168,801,162,808,162,800,166,790,161,765,158,752,153,729,142,681,141,667,141,640,145,617" 
        zonCordArray[90]="131,204,128,211,124,215,122,223,118,233,113,245,110,257,107,263,107,267,109,272,110,275,153,197,143,200" 
        zonCordArray[91]="155,197,110,275,116,279,118,283,122,275,130,265,132,259,136,242,149,220,153,205" 
        zonCordArray[88]="131,204,121,212,110,218,106,225,99,237,95,248,92,259,87,267,80,275,72,289,67,316,63,337,60,349,56,359,51,367,44,377,34,390,29,393,21,397,16,409,14,419,16,422,20,422,16,432,15,438,19,441,22,441,26,437,23,442,27,445,30,445,33,442,34,447,38,448,56,398,85,324,95,293,105,287,113,286,118,286,120,283,113,276,107,271,107,259,117,235,124,218" 
        zonCordArray[93]="14,419,9,427,9,430,14,431,16,427,19,423,16,422" 
        zonCordArray[187]="295,405,286,422,283,424,276,428,268,431,247,431,247,463,247,475,245,494,243,511,253,544,259,567,261,584,265,599,273,611,276,622,280,635,282,644,282,659,290,644,302,625,313,605,312,582,312,567,312,559,307,523,299,485,293,448,293,433,293,419" 
        zonCordArray[76]="263,599,272,610,276,618,279,630,280,637,282,659,282,690,282,725,282,751,280,776,277,788,271,803,271,795,272,770,272,748,270,717,263,699,261,688,260,673,262,658,265,637,268,623" 
        zonCordArray[188]="302,626,290,645,282,660,282,705,282,737,282,757,279,779,276,794,271,803,267,819,288,837,297,837,316,837,333,837,345,837,351,836,356,836,358,834,355,829,345,829,334,828,320,827,309,826,299,822,293,822,288,816,290,807,294,777,301,735,304,708,306,683,302,667,299,645" 
        zonCordArray[79]="267,818,266,826,266,830,268,837,272,837,286,838,274,824" 
        zonCordArray[75]="346,828,334,827,325,826,313,825,306,823,298,821,292,819,290,810,294,779,298,750,302,723,306,704,306,682,302,662,299,644,302,625,313,605,313,611,320,631,321,654,320,666,319,690,313,721,307,752,300,783,303,800,313,809,325,817,336,821,346,822,354,828" 
        zonCordArray[80]="153,619,153,640,153,651,151,660,150,677,153,699,157,723,164,756,170,791,172,798,167,801,162,807,158,819,153,824,149,828,150,834,153,836,155,838,154,831,163,821,167,818,179,803,178,818,178,793,178,773,174,743,170,712,167,686,167,670,167,663,170,659,161,638" 
        zonCordArray[119]="176,807,169,814,162,818,159,825,155,829,155,837,172,838,180,838,188,837,194,837,193,827,191,823,183,816" 
        zonCordArray[77]="197,602,182,624,176,641,167,663,167,687,168,705,171,727,174,752,178,783,178,803,178,819,193,835,195,836,195,836,196,829,196,828,196,826,195,824,196,820,196,809,195,790,192,768,190,746,190,715,192,698,196,679,195,661,190,646,190,626" 
        zonCordArray[92]="73,288,66,308,63,318,60,334,44,375,51,367,59,357,60,349,66,324,69,308" 
        zonCordArray[89]="118,286,107,286,103,287,95,293,91,305,87,320,74,352,58,398,65,398,67,386,74,373,87,349,95,334,107,311,110,305,116,289" 
        zonCordArray[93]="13,435,9,443,5,451,7,459,8,463,12,460,15,455,20,442,23,442,20,451,16,459,16,463,20,463,23,460,27,455,30,445,36,447,33,453,30,462,30,464,33,464,38,448,36,447,30,445,29,445,23,442,20,441,19,441" 
        zonCordArray[94]="58,398,40,444,33,464,34,464,40,459,45,442,41,462,41,464,43,464,52,448,59,433,63,416,65,400" 
        zonCordArray[81]="319,209,323,215,328,233,337,250,338,263,338,270,337,275,335,278,330,286,331,286,337,287,344,289,349,290,352,296,368,334,378,366,393,400,409,442,411,451,414,451,414,444,415,442,420,448,424,448,428,445,425,440,426,438,429,444,434,442,436,440,434,432,429,424,436,419,432,412,428,404,422,398,414,396,406,378,393,363,388,352,382,331,376,292,370,279,361,264,353,259,349,237,338,219,330,215" 
        zonCordArray[83]="294,200,306,205,319,209,323,215,328,234,335,249,338,263,338,271,337,276,326,252,315,231,306,215" 
        zonCordArray[84]="293,200,306,215,313,229,322,244,330,264,337,275,332,282,330,283,323,272,317,264,307,238,301,218" 
        zonCordArray[85]="377,292,378,307,382,324,386,345,388,352,393,363,405,377,392,341" 
        zonCordArray[82]="331,287,337,287,344,289,349,293,353,299,364,326,374,353,393,400,385,401,384,396,380,382,369,362,351,334,337,305" 
        zonCordArray[86]="436,419,439,428,438,431,432,430,429,424,432,422" 
        zonCordArray[87]="385,401,393,400,403,431,409,442,414,467,413,466,411,464,405,442,402,444,405,455,406,464,405,467,400,467,396,453,395,441,391,432,385,412" 
        zonCordArray[86]="411,451,414,467,415,466,414,451,420,451,428,464,431,464,432,463,428,447,429,445,438,462,440,463,442,459,436,440,434,442,429,444,424,448,420,448,414,451"  
	}
	
	return zonCordArray[zonID];
}


function returnZonCords_Female(pos,zonID){
	var zonCordArray=new Array();
	zonCordArray[0]="Nothing";
	
	// FRONT
	if (pos==1){
		zonCordArray[69]="146,550,143,521,144,479,151,444,155,412,160,395,155,367,146,396,144,409,135,446,131,490,139,535" 
        zonCordArray[71]="212,440,221,444,216,471,214,491,208,525,206,548,196,542,196,517,200,486" 
        zonCordArray[70]="152,637,170,645,181,645,201,616,205,573,206,549,196,540,195,529,200,482,212,440,196,426,185,411,160,386,156,411,148,446,144,479,142,517,142,537,146,564,152,594" 
        zonCordArray[75]="156,836,141,838,127,838,115,838,109,836,117,828,130,824,150,807,163,789,158,748,152,702,147,669,151,636,168,645,162,677,164,715,173,781,172,813,164,827" 
        zonCordArray[76]="156,832,168,823,172,811,173,795,173,782,172,769,167,739,163,706,160,687,162,672,168,645,177,645,184,641,193,629,202,614,200,639,204,657,209,687,201,718,191,774,191,799,193,817,176,831,168,836" 
        zonCordArray[79]="192,817,184,824,177,830,171,835,188,836,192,832,195,824" 
        zonCordArray[72]="226,442,228,459,229,482,230,506,234,523,237,535,238,554,239,554,245,545,248,528,249,512,245,474,243,457,241,436,233,442" 
        zonCordArray[73]="297,565,292,591,291,612,293,635,270,649,243,631,242,592,238,557,246,540,249,524,246,491,243,459,239,442,263,407,286,383,286,453,289,482,289,515,295,546" 
        zonCordArray[77]="242,628,251,637,260,644,270,649,276,695,272,733,263,781,253,811,249,798,251,772,246,728,241,698,238,673,240,648" 
        zonCordArray[78]="289,835,274,836,260,835,253,830,250,813,260,790,271,745,276,703,274,672,270,647,282,641,293,635,297,668,292,707,283,752,279,780,279,798,282,817" 
        zonCordArray[80]="291,835,297,835,295,829,288,822,282,818,286,827" 
        zonCordArray[9]="259,64,258,59,263,55,266,57,268,64,267,71,264,80,260,84,258,84,259,75,258,73,262,72,264,71,264,67,263,64,260,64" 
        zonCordArray[1]="226,5,220,5,212,8,205,10,201,14,197,21,200,33,200,41,201,49,200,56,206,54,214,55,218,56,222,59,217,59,214,58,212,56,208,58,208,59,210,60,214,60,214,62,208,62,209,69,214,71,218,76,222,80,226,82" 
        zonCordArray[3]="200,25,201,44,202,56,204,65,209,65,209,68,216,73,227,82,226,85,226,88,214,88,206,86,206,84,202,77,200,60" 
        zonCordArray[16]="250,57,247,57,243,60,243,65,247,63,250,61" 
        zonCordArray[15]="245,63,238,63,238,60,245,60" 
        zonCordArray[11]="214,64,214,61,208,61,206,63,208,64" 
        zonCordArray[17]="239,57,243,59,246,60,247,57,251,55,245,55,239,56" 
        zonCordArray[14]="222,61,218,57,214,57,214,59,216,60,218,61" 
        zonCordArray[18]="233,59,237,59,238,57,241,57,241,54,237,55,233,57" 
        zonCordArray[13]="201,54,213,55,216,57,216,59,212,59,208,60,206,59" 
        zonCordArray[12]="204,59,206,59,209,61,210,64,209,67,208,65,204,63" 
        zonCordArray[10]="259,67,260,62,264,64,266,66,263,71,260,72,258,71" 
        zonCordArray[7]="194,67,193,57,190,56,188,59,186,63,188,72,189,79,192,84,194,86,197,86,196,75,192,73,189,72,189,67,192,65" 
        zonCordArray[2]="226,5,231,5,237,5,241,7,246,10,251,14,255,19,254,35,253,54,243,54,238,55,233,56,230,59,230,59,234,59,237,57,239,56,243,57,245,59,242,60,238,60,241,61,243,61,243,67,237,72,233,78,227,82" 
        zonCordArray[4]="255,30,254,40,254,51,254,54,251,56,250,60,242,67,238,71,234,77,229,81,228,81,228,88,242,88,246,84,249,78,250,73,254,64,257,42" 
        zonCordArray[6]="226,89,226,110,235,108,243,104,251,97,258,80,259,54,261,46,260,35,258,22,255,19,255,29,257,52,250,67,249,79,247,84,242,88,237,89" 
        zonCordArray[5]="198,19,201,42,201,69,204,81,205,86,208,88,228,89,228,110,220,109,209,104,205,101,196,85,191,50,191,43,193,32" 
        zonCordArray[82]="195,69,193,65,189,65,188,68,189,72,193,75,196,75" 
        zonCordArray[27]="226,109,226,129,230,127,233,125,233,113,233,109" 
        zonCordArray[22]="217,109,224,110,225,112,225,131,225,131,217,127" 
        zonCordArray[21]="218,128,216,108,212,106,205,100,210,113,214,122" 
        zonCordArray[26]="233,108,243,104,253,95,246,110,237,125,233,129,233,119" 
        zonCordArray[25]="232,129,237,121,243,115,246,109,253,102,245,125,243,127,242,130,231,143,232,137" 
        zonCordArray[28]="225,129,228,129,231,127,232,133,230,144,225,151" 
        zonCordArray[20]="204,99,210,113,216,127,216,130,216,134,214,141,210,137,208,123" 
        zonCordArray[23]="216,125,221,129,224,131,224,148,220,144,217,141" 
        zonCordArray[19]="204,100,201,135,201,171,213,171,225,171,225,150,225,150,220,144,213,135,208,129,206,115" 
        zonCordArray[24]="251,96,247,115,245,126,239,135,231,144,226,148,226,171,239,170,251,169,251,144" 
        zonCordArray[35]="251,119,251,151,263,150,274,147,271,144,268,129" 
        zonCordArray[34]="269,131,282,141,286,143,299,148,288,147,276,148,272,146" 
        zonCordArray[31]="201,116,201,151,191,150,181,146,183,143,186,126" 
        zonCordArray[30]="173,143,182,146,188,125,178,130,172,135,168,139,168,139" 
        zonCordArray[32]="181,144,192,151,201,152,201,171,187,171,175,171,164,172,173,155,180,148" 
        zonCordArray[29]="166,169,176,150,181,147,176,144,168,139,167,139,162,144,151,145,145,149,140,153,130,169" 
        zonCordArray[36]="250,152,251,169,270,169,284,171,283,166,283,162,279,155,271,147,263,150" 
        zonCordArray[33]="270,147,284,147,291,148,297,148,296,148,308,156,313,162,318,171,308,171,300,171,286,171,275,151" 
        zonCordArray[39]="225,172,224,196,245,196,263,195,291,192,286,172,249,169" 
        zonCordArray[38]="225,172,193,172,164,171,163,190,175,196,196,196,224,196" 
        zonCordArray[41]="163,191,162,201,159,209,162,212,168,214,187,216,224,216,224,197,188,197,172,195" 
        zonCordArray[42]="224,197,224,214,251,213,263,213,280,213,286,209,292,205,292,198,288,192,250,197" 
        zonCordArray[43]="160,213,162,225,168,234,180,239,191,241,225,241,225,216,196,217,175,216" 
        zonCordArray[44]="222,214,224,241,251,241,267,241,279,237,288,230,291,227,292,222,291,206,279,213,251,214" 
        zonCordArray[45]="159,220,159,226,154,239,158,250,160,253,166,254,164,246,164,239,163,229" 
        zonCordArray[49]="158,258,167,274,163,259" 
        zonCordArray[48]="292,226,296,239,297,241,296,246,295,249,293,253,291,254,289,251,287,245,287,242" 
        zonCordArray[52]="287,251,286,274,291,262,292,254" 
        zonCordArray[46]="162,225,167,231,173,237,184,239,221,238,221,259,192,258,176,255,170,254,167,253,164,249,163,237" 
        zonCordArray[47]="221,238,267,239,276,237,284,234,289,230,295,224,289,238,289,249,287,253,276,255,263,256,242,259,221,259" 
        zonCordArray[50]="159,256,156,254,167,255,176,256,192,258,206,259,220,259,220,278,179,278,165,276,164,269,164,263,162,256" 
        zonCordArray[51]="221,259,221,278,242,278,260,277,274,275,284,274,287,272,286,264,287,253,284,253,272,255,258,258,239,259" 
        zonCordArray[53]="166,280,164,272,167,276,176,278,191,278,220,279,220,297,187,295,175,293,176,293,170,292,168,284" 
        zonCordArray[54]="220,279,247,278,262,278,271,276,275,276,286,274,282,288,276,292,268,293,259,295,239,296,220,297" 
        zonCordArray[55]="167,291,167,292,179,295,187,295,199,296,220,297,220,313,201,313,184,312,172,312,175,312,167,312,168,301" 
        zonCordArray[56]="218,299,234,297,247,296,260,295,272,293,279,289,278,300,278,305,279,309,271,312,259,313,245,314,229,314,218,314" 
        zonCordArray[57]="167,314,166,312,179,313,195,314,220,314,219,332,193,332,173,329,164,329,166,321,167,318" 
        zonCordArray[58]="220,314,228,314,239,314,258,314,268,312,277,308,280,326,256,332,234,332,220,332" 
        zonCordArray[59]="164,329,191,333,218,333,218,349,192,347,170,345,160,342,162,338" 
        zonCordArray[60]="218,333,242,333,257,332,272,329,282,328,282,336,284,339,246,347,234,349,218,349" 
        zonCordArray[61]="162,342,183,347,217,349,217,365,200,363,175,361,155,358,156,357,158,349" 
        zonCordArray[62]="218,349,238,347,254,346,268,342,280,339,286,345,289,351,268,359,249,361,230,363,218,365" 
        zonCordArray[63]="156,359,160,361,177,361,197,363,217,365,217,396,199,391,180,380,164,368,160,366,156,362" 
        zonCordArray[64]="218,365,235,363,255,361,270,359,287,354,266,370,250,383,234,390,218,395" 
        zonCordArray[65]="155,362,164,368,179,379,196,390,219,394,221,423,201,420,187,413,170,400,159,386,154,368" 
        zonCordArray[66]="219,393,237,388,254,380,270,366,288,353,284,366,286,387,258,409,239,415,221,420,220,415" 
        zonCordArray[68]="221,421,237,416,254,409,266,404,255,425,242,438,233,445,222,446" 
        zonCordArray[67]="181,412,191,413,199,419,209,420,220,421,221,444,202,433,191,421,185,415" 
        zonCordArray[74]="288,351,286,361,286,375,284,415,287,451,289,488,289,521,292,533,293,549,297,563,299,545,307,515,311,486,311,454,305,425,301,412,298,392,294,366" 
        zonCordArray[40]="286,171,311,172,320,172,309,172,318,172,322,180,324,189,326,202,325,212,325,218,328,227,333,242,325,237,317,226,313,220,307,214,300,209,293,204,290,191,289,181" 
        zonCordArray[91]="293,214,292,221,293,237,300,253,299,233,297,225,296,218" 
        zonCordArray[90]="293,205,300,208,307,213,315,220,316,234,316,250,312,260,307,271,303,262,300,250,300,238,299,225,293,213" 
        zonCordArray[88]="333,241,338,254,340,260,349,275,355,288,351,285,346,282,336,268,334,255,333,246" 
        zonCordArray[89]="316,225,321,231,328,237,330,241,333,242,336,243,338,254,338,266,337,275,336,285,341,303,349,329,362,362,377,400,378,396,375,399,367,403,357,384,346,366,330,338,325,312,318,295,313,284,307,270,313,260,317,238" 
        zonCordArray[92]="338,271,337,275,337,285,345,317,361,361,371,382,376,397,388,394,376,372,374,354,366,326,358,295,353,288,346,282,341,276" 
        zonCordArray[88]="396,399,407,406,413,412,419,421,399,407,396,403" 
        zonCordArray[93]="395,398,390,395,378,397,384,409,390,425,391,442,392,469,402,458,399,454,394,444,395,442,407,469,407,466,409,450,408,443,405,440,411,449,420,458,425,457,403,416,419,428,424,426,415,419,404,411,398,403,395,399" 
        zonCordArray[94]="379,400,384,409,389,425,391,442,391,467,390,467,384,450,384,444,380,437,380,459,375,457,374,442,371,419,366,403,374,400" 
        zonCordArray[37]="135,169,131,170,127,182,125,191,125,198,124,209,123,224,123,230,121,238,138,231,143,227,148,217,160,205,161,197,162,188,163,169" 
        zonCordArray[84]="158,208,154,222,152,233,151,241,159,226,160,212" 
        zonCordArray[83]="159,206,142,222,138,235,139,247,139,258,142,268,144,266,150,254,154,241,154,220" 
        zonCordArray[81]="122,237,118,239,121,245,118,238,112,264,100,295,106,285,108,283,112,275,120,254,119,253,122,245" 
        zonCordArray[82]="139,245,139,231,131,234,121,238,121,253,119,259,117,264,117,271,119,280,117,301,117,313,106,350,95,377,85,405,89,407,94,411,97,401,108,380,119,355,129,326,134,310,138,289,139,278,143,268,139,262,139,256,139,253" 
        zonCordArray[85]="115,268,110,280,102,293,100,295,98,301,96,307,93,314,89,328,85,357,83,375,81,384,79,390,77,394,77,397,72,403,85,405,96,376,105,351,117,318,118,301,118,280" 
        zonCordArray[81]="75,404,63,409,58,413,52,419,47,430,66,416,67,413" 
        zonCordArray[86]="72,408,74,404,83,405,80,411,75,424,71,446,68,477,66,474,63,457,64,451,64,448,58,477,54,477,53,469,58,444,57,451,56,444,49,466,43,463,44,457,47,446,56,433,47,441,47,438,44,433,55,424,66,416,67,413" 
        zonCordArray[87]="82,405,87,407,90,408,94,411,86,436,89,448,89,461,87,469,81,471,81,469,78,447,78,445,78,458,73,477,67,477,68,467,75,425,82,409" 

	}
	
	// LEFT
	if (pos==2){
		zonCordArray[161]="173,66,178,60,180,60,180,62,177,70" 
	    zonCordArray[151]="173,63,171,65,175,65,175,61" 
	    zonCordArray[171]="168,59,177,59,175,63" 
	    zonCordArray[2]="215,9,215,3,203,6,190,12,183,16,175,21,172,28,168,38,165,53,167,60,158,76,157,80,159,82,165,83,179,69,173,69,173,65,171,64,168,58,174,59,182,60,183,56,184,47,187,36,192,28,202,26,215,25" 
	    zonCordArray[75]="200,768,204,789,201,799,196,811,191,827,177,829,176,834,180,838,167,838,159,839,150,835,142,835,135,836,128,830,134,827,139,826,156,821,172,814,183,807,189,800,199,787" 
	    zonCordArray[76]="197,654,194,640,198,639,203,638,205,638,209,639,214,647,219,657,223,671,224,683,228,698,232,713,235,729,240,753,234,786,236,801,221,814,192,827,197,808,202,794,204,784,199,765,200,735,200,710,199,697,198,687,197,668" 
	    zonCordArray[70]="168,484,168,479,167,467,168,447,167,459,173,495,179,527,182,544,186,569,192,591,192,602,197,618,204,629,208,638,195,640,193,633,192,631,190,623,188,615,185,605,185,594,184,584,182,571,178,545,173,516,170,508,170,502,169,495" 
	    zonCordArray[119]="285,814,288,823,287,829,283,830,283,835,265,835,273,826" 
	    zonCordArray[80]="264,631,274,647,279,660,282,676,282,689,280,708,279,729,278,757,283,786,287,803,288,816,285,816,274,826,266,834,242,835,217,838,201,839,204,835,210,829,217,826,226,825,249,821,265,816,271,810,276,805,276,801,275,790,273,756,271,700,272,675,269,659" 
	    zonCordArray[78]="252,616,263,630,265,643,267,648,268,658,270,664,271,671,272,678,272,689,271,702,271,708,271,725,273,772,275,790,276,799,275,804,272,812,257,819,242,824,221,826,214,828,210,829,205,833,203,837,203,840,192,840,184,840,179,838,176,830,189,828,222,814,238,800,243,791,244,775,239,751,231,708,223,679,218,654,209,638,219,629,224,621,226,614,226,606,227,598,238,603" 
	    zonCordArray[118]="235,600,227,597,239,594,246,589,248,607,250,616,241,605" 
	    zonCordArray[74]="199,368,234,343,246,387,233,407,241,408,239,415,222,433,225,443,231,443,241,435,252,435,262,413,274,443,261,457,260,524,245,591,226,598,208,530,201,476,198,441,197,416,201,391" 
	    zonCordArray[194]="262,411,270,397,271,387,276,378,280,386,283,398,285,409,284,418,284,419,283,426,281,429,280,433,279,436,276,440,274,443,272,437,270,431,268,425,265,420" 
	    zonCordArray[73]="181,392,199,366,200,396,197,436,201,472,204,509,209,531,215,557,218,568,223,583,226,598,226,607,224,616,222,624,216,632,210,637,205,633,201,626,197,619,193,605,191,590,187,578,184,558,180,534,176,511,172,491,168,461,168,446,172,426" 
	    zonCordArray[116]="234,342,254,342,260,352,263,357,260,371,256,377,246,387" 
	    zonCordArray[68]="177,383,177,392,177,398,178,401,182,391,186,383,194,372,203,363,189,373" 
	    zonCordArray[66]="173,365,231,343,235,343,222,352,207,362,189,373,176,384,175,378" 
	    zonCordArray[64]="171,343,230,343,172,366,170,355" 
	    zonCordArray[64]="181,324,194,321,213,317,229,315,241,313,248,311,248,321,249,326,249,329,252,335,253,340,230,342,178,344,181,332" 
	    zonCordArray[94]="241,439,245,438,251,436,253,434,255,430,257,427,258,423,260,419,262,413,264,408,268,401,271,388,276,377,284,372,277,369,268,386,263,392,259,402,255,408,247,427,242,432" 
	    zonCordArray[93]="241,406,239,416,231,424,231,425,225,430,225,434,219,438,220,438,221,438,223,442,225,442,224,444,226,445,230,444,234,441,237,438,241,435,246,428,248,423,257,407,253,403,250,399" 
	    zonCordArray[93]="246,386,241,392,239,399,233,407,234,408,239,408,243,404,250,399,253,394,249,389" 
	    zonCordArray[89]="319,290,304,320,290,347,277,368,283,371,289,362,296,348,300,340,308,323,310,318,314,307,316,299" 
	    zonCordArray[90]="290,199,283,207,286,217,288,230,295,244,300,253,313,270,309,256,308,252,306,243,303,233,299,220,295,207" 
	    zonCordArray[91]="280,299,282,292,286,299,287,307,284,317,282,326,278,333,265,360,269,338,273,325,277,310" 
	    zonCordArray[88]="243,208,251,211,258,212,268,211,283,208,286,220,290,235,297,247,304,257,312,269,316,278,318,286,319,289,313,302,306,316,297,333,290,349,284,358,282,362,278,367,276,371,273,377,265,390,256,406,250,400,253,394,247,386,261,370,264,358,271,346,277,335,281,329,286,314,287,305,286,297,283,291,284,288,284,283,273,270,262,250,254,236" 
	    zonCordArray[61]="176,325,174,328,174,334,171,342,178,343,180,331,181,325" 
	    zonCordArray[60]="181,310,193,307,214,302,234,297,234,314,218,316,196,320,180,324,180,319" 
	    zonCordArray[59]="175,312,181,310,179,325,176,326,176,321,176,315" 
	    zonCordArray[58]="177,296,233,281,235,296,219,301,198,306,181,310,180,304" 
	    zonCordArray[57]="173,297,174,297,176,295,181,310,176,312,173,304" 
	    zonCordArray[55]="166,281,167,285,168,287,168,291,173,296,177,295,172,280" 
	    zonCordArray[53]="159,267,166,264,169,271,171,278,172,280,167,282,161,273" 
	    zonCordArray[56]="172,279,177,295,194,292,233,281,232,262,192,274" 
	    zonCordArray[54]="231,245,194,257,167,264,169,270,171,274,172,281,187,276,206,270,223,265,233,261" 
	    zonCordArray[115]="235,297,235,314,248,310,248,301,249,294" 
	    zonCordArray[114]="233,279,235,297,249,293,251,283,253,275" 
	    zonCordArray[113]="232,262,233,279,253,275,254,268,257,260,256,257" 
	    zonCordArray[115]="233,245,233,261,258,256,259,245,255,240" 
	    zonCordArray[111]="233,221,246,218,255,240,234,244" 
	    zonCordArray[51]="208,230,233,220,233,244,221,248,215,249,213,250,211,238" 
	    zonCordArray[189]="234,221,233,205,240,204,245,212,248,217" 
	    zonCordArray[48]="208,214,233,205,233,221,209,229,208,224" 
	    zonCordArray[51]="158,246,179,242,209,230,211,238,212,243,213,246,215,248,190,257,175,261,164,264,163,256" 
	    zonCordArray[50]="155,251,156,254,159,255,158,260,160,265,158,266,164,264,164,263,163,256,158,247,152,248" 
	    zonCordArray[47]="157,233,172,231,178,227,187,224,195,221,199,220,209,213,207,223,208,225,210,229,182,241,157,247,156,240" 
	    zonCordArray[46]="146,234,145,239,148,240,150,243,150,248,157,246,157,240,156,234,150,234" 
	    zonCordArray[109]="225,188,213,194,210,199,209,206,209,214,238,203,232,194,232,190" 
	    zonCordArray[44]="166,210,189,202,215,193,213,194,210,198,209,207,209,214,203,217,199,220,188,224,178,227,167,233,157,235" 
	    zonCordArray[43]="155,212,148,226,146,235,159,234,159,232,167,208" 
	    zonCordArray[48]="176,189,215,174,220,179,222,183,228,187,206,196,184,203,166,209,172,195" 
	    zonCordArray[41]="166,193,163,199,159,206,157,207,156,212,166,207,169,201,171,196,175,189" 
	    zonCordArray[40]="210,161,213,170,216,177,224,185,232,191,236,199,241,206,249,211,261,212,271,211,284,206,291,198,286,192,284,183,280,176,277,167,263,168,253,168,247,165,241,157" 
	    zonCordArray[39]="182,173,199,166,212,161,214,175,211,175,192,182,175,189,178,181" 
	    zonCordArray[38]="175,176,170,184,167,192,177,187,178,180,182,172" 
	    zonCordArray[104]="242,155,274,154,277,161,279,167,260,169,254,168,247,164,243,159" 
	    zonCordArray[103]="235,115,235,129,237,141,242,156,274,155,271,149,260,134,252,121,247,115" 
	    zonCordArray[33]="211,161,215,154,219,145,237,141,242,156,226,158" 
	    zonCordArray[36]="193,168,206,150,219,145,215,156,212,160" 
	    zonCordArray[34]="218,145,229,133,234,126,238,141,230,142" 
	    zonCordArray[35]="224,114,207,150,220,144,227,135,232,130,234,127,235,114" 
	    zonCordArray[24]="214,114,205,142,203,148,199,150,196,155,191,161,177,174,193,169,205,152,216,133,225,114" 
	    zonCordArray[197]="199,150,193,153,188,156,184,161,178,171,174,178,182,169,196,156,198,151" 
	    zonCordArray[28]="200,110,196,115,199,121,199,127,200,131,197,150,200,150,203,134,203,117" 
	    zonCordArray[25]="203,91,203,94,203,102,199,110,203,116,203,121,202,131,202,150,213,115,212,91" 
	    zonCordArray[27]="190,107,185,112,193,113,197,116,200,110,197,110" 
	    zonCordArray[26]="203,92,200,96,196,101,191,107,194,108,197,110,198,112,199,111,202,104" 
	    zonCordArray[10]="169,114,183,107,199,97,190,108,184,112,179,114,176,114" 
	    zonCordArray[10]="208,66,212,66,213,67,213,70,211,74,205,74,207,67" 
	    zonCordArray[6]="195,27,195,37,195,45,195,58,194,72,193,81,187,89,172,92,164,92,162,94,164,97,166,98,166,104,167,110,170,113,170,113,182,108,200,96,205,85,206,72,206,55,207,48,210,44,213,43,213,39,213,34,213,26" 
	    zonCordArray[4]="195,34,195,27,190,29,184,42,179,67,162,85,162,89,161,90,162,91,164,92,175,92,184,91,191,85,194,78,195,57" 
	    zonCordArray[101]="228,106,242,106,247,114,231,114" 
	    zonCordArray[100]="224,99,240,99,242,105,228,106" 
	    zonCordArray[99]="223,93,239,93,240,99,231,99,223,99" 
	    zonCordArray[98]="237,88,240,88,238,93,232,93,232,88" 
	    zonCordArray[97]="239,88,242,83,241,83,236,83,232,83,232,88" 
	    zonCordArray[91]="208,67,206,66,207,50,209,46,212,44,216,43,220,45,223,50,224,54,224,75,223,95,228,107,231,114,213,114,212,91,203,91,204,88,207,75,212,75,213,74,214,71,214,68,213,67,208,67" 
	    zonCordArray[95]="213,25,220,26,225,29,228,33,230,40,230,48,231,68,231,77,231,93,223,93,223,77,224,64,224,50,222,46,220,44,213,42" 
	    zonCordArray[96]="214,4,214,12,214,25,221,26,226,31,229,37,230,43,230,50,232,65,232,76,232,82,242,81,244,75,249,68,251,61,253,49,251,37,249,27,244,19,237,14,229,8,221,5" 

	}
	
	//RIGHT
	if (pos==3){
zonCordArray[186]="215,7,206,8,198,12,185,22,181,31,177,48,180,62,183,74,186,81,189,81,193,81,197,81,196,68,196,55,198,39,199,30,204,26,208,26,215,26" 
    zonCordArray[3]="239,29,241,28,248,32,250,41,252,48,253,55,255,63,273,84,272,88,273,91,271,92,264,92,251,91,244,85,239,77,239,64,239,44" 
    zonCordArray[185]="215,25,207,25,201,28,199,34,197,45,196,57,197,71,198,88,197,96,204,97,204,81,204,60,205,55,206,50,209,47,215,43" 
    zonCordArray[5]="215,44,215,28,239,28,239,46,239,69,241,78,242,83,248,88,261,92,272,92,270,96,268,97,266,102,265,104,266,107,267,111,261,114,246,108,235,100,231,90,229,76,227,57,227,50,227,49,227,48,224,45,217,44" 
    zonCordArray[73]="226,64,226,56,226,49,221,45,213,43,208,46,205,50,204,58,203,70,203,85,203,99,201,108,199,117,220,117,214,87,229,87,228,75,222,73,220,76,220,72,219,71,218,66" 
    zonCordArray[81]="227,66,221,66,220,70,221,72,224,74,227,74,228,74" 
    zonCordArray[12]="237,105,232,96,238,103,261,113,256,115,255,114,252,114,247,112,243,110" 
    zonCordArray[21]="227,92,227,104,228,107,229,110,231,117,234,111,240,107,233,96,230,86" 
    zonCordArray[20]="216,88,230,88,230,89,232,102,233,109,235,111,233,116,231,121,230,130,231,153,227,142,222,129,221,121,220,111,217,98" 
    zonCordArray[22]="240,106,249,113,243,112,240,113,237,116,235,121,230,116" 
    zonCordArray[23]="231,120,235,122,235,127,235,134,236,138,237,150,233,152,231,145,231,137,231,123" 
    zonCordArray[19]="210,117,216,140,228,160,237,171,250,175,241,165,237,155,234,152,232,150,225,139,220,117" 
    zonCordArray[123]="196,82,186,82,188,88,191,88,194,88,197,88" 
    zonCordArray[126]="188,88,198,89,198,97,189,97,189,93" 
    zonCordArray[127]="189,97,204,97,202,104,197,104,189,104" 
    zonCordArray[128]="191,104,202,104,201,110,187,110,188,108" 
    zonCordArray[129]="187,110,199,111,200,113,200,117,185,117,187,114" 
    zonCordArray[24]="235,150,241,153,244,156,248,161,257,175,249,174,241,166,240,160,235,154" 
    zonCordArray[31]="200,117,209,117,213,127,218,144,222,151,214,150,210,147,202,139,197,134,194,130" 
    zonCordArray[30]="194,131,190,148,196,148,200,148,215,153,205,142,198,135" 
    zonCordArray[3]="214,151,223,151,232,165,238,172,227,170,221,169,218,161" 
    zonCordArray[29]="190,148,201,148,207,150,214,152,217,160,221,169,203,167,187,165,189,154" 
    zonCordArray[134]="184,118,200,117,193,133,190,146,187,165,170,164,164,164,157,164,160,155,167,144,175,133" 
    zonCordArray[141]="156,165,165,165,185,166,183,169,178,176,173,177,164,179,154,177,154,172,155,170" 
    zonCordArray[37]="186,165,202,167,218,169,217,176,214,179,210,182,204,188,197,197,193,206,189,214,179,213,166,213,153,213,143,210,139,209,142,202,144,198,145,194,147,191,150,182,153,177,165,179,172,179,178,175,183,171" 
    zonCordArray[38]="219,168,239,172,249,175,254,187,259,194,242,190,212,181,216,177" 
    zonCordArray[39]="249,173,255,174,261,184,268,196,259,194,253,182" 
    zonCordArray[41]="213,182,258,194,263,207,266,215,266,219,249,213,226,206,199,195,203,189,209,182" 
    zonCordArray[4]="258,193,268,197,274,207,284,223,276,220,265,218,263,210,261,203" 
    zonCordArray[43]="210,200,242,212,267,219,272,231,271,244,250,239,244,236,232,232,226,228,218,225,217,223,215,218,214,208,214,204" 
    zonCordArray[117]="189,213,194,205,197,199,200,195,212,201,214,209,216,216,217,224" 
    zonCordArray[44]="266,218,279,221,283,222,286,226,288,234,286,240,283,248,272,244,271,237,272,229" 
    zonCordArray[47]="271,243,265,253,264,260,273,264,274,259,277,254,283,248,279,247,275,243" 
    zonCordArray[46]="271,244,265,243,258,241,250,239,242,236,231,232,217,224,217,233,217,239,217,246,239,255,256,259,265,261,265,254" 
    zonCordArray[45]="191,214,209,221,217,225,218,233,217,240,219,247,191,234,191,225" 
    zonCordArray[151]="185,220,184,226,180,232,191,234,191,224,191,213,186,214" 
    zonCordArray[156]="176,238,175,244,173,248,173,253,192,258,192,245,192,234,180,232" 
    zonCordArray[160]="175,259,178,263,178,268,179,271,180,273,192,277,193,257,176,253" 
    zonCordArray[49]="192,235,217,245,216,253,213,259,210,262,209,263,192,259" 
    zonCordArray[50]="217,245,239,253,254,255,267,261,264,267,262,274,260,276,258,279,239,275,217,267,206,263,210,263,213,259,216,254" 
    zonCordArray[51]="267,263,274,263,274,265,273,272,270,277,266,283,261,281,258,279,262,271" 
    zonCordArray[53]="193,259,231,272,250,278,258,280,257,284,255,287,254,291,252,296,246,294,210,284,193,276" 
    zonCordArray[54]="257,280,264,283,266,285,263,293,261,299,251,295,254,289" 
    zonCordArray[163]="180,274,195,277,194,295,183,293,182,282" 
    zonCordArray[55]="195,277,218,287,241,293,253,297,252,313,223,303,195,294" 
    zonCordArray[56]="253,297,261,299,259,306,259,308,259,314,253,312,253,306" 
    zonCordArray[166]="185,294,196,295,196,313,186,312,184,303" 
    zonCordArray[57]="196,294,227,305,253,313,253,318,253,325,251,325,220,319,196,313" 
    zonCordArray[58]="253,313,258,313,259,317,259,320,258,327,253,325,253,320" 
    zonCordArray[145]="185,310,197,314,195,331,184,329,185,320" 
    zonCordArray[59]="197,314,221,320,247,325,253,326,254,340,245,338,223,336,206,333,196,331" 
    zonCordArray[60]="255,326,260,327,259,333,260,340,254,339,254,334" 
    zonCordArray[61]="184,330,182,338,179,340,177,344,177,348,196,349,221,353,253,359,253,348,253,346,254,340,225,337,202,332" 
    zonCordArray[6]="254,340,261,340,262,349,263,354,262,360,252,359,254,351" 
    zonCordArray[83]="137,210,152,212,145,230,139,243,134,254,128,265,118,274,124,263,126,251,129,241,132,231,135,218" 
    zonCordArray[81]="152,213,160,213,170,214,179,214,187,213,183,229,171,250,166,260,160,270,155,276,149,283,145,289,144,293,144,297,145,301,147,311,151,322,155,329,160,339,163,343,166,348,170,362,180,379,187,385,176,392,189,404,186,408,182,415,178,409,165,381,151,360,148,354,144,344,137,333,124,308,116,296,113,288,114,282,118,276,129,264,137,248,145,232,150,218" 
    zonCordArray[86]="186,386,193,396,198,401,202,405,195,408,190,406,187,402,184,398,176,391,179,391,181,389" 
    zonCordArray[86]="189,403,197,414,204,424,207,429,210,433,210,436,208,441,208,443,205,445,199,440,195,435,191,432,185,427,184,423,178,419,178,419,183,413,185,408" 
    zonCordArray[87]="147,354,154,364,158,370,163,377,166,382,169,390,173,398,177,405,181,414,181,419,191,432,205,446,203,449,188,434,179,421,175,413,174,406,164,391,157,382,156,377,150,370,141,356" 
    zonCordArray[81]="143,358,148,353,138,336,126,312,116,297,120,308,125,323,130,335,137,349" 
    zonCordArray[85]="149,283,153,295,158,310,164,334,166,350,153,325,148,313,144,298,145,288" 
    zonCordArray[63]="207,351,233,355,261,359,262,366,260,375,259,380,242,371,220,361" 
    zonCordArray[65]="197,349,207,350,214,356,239,369,258,380,256,399,238,388,223,375,211,364" 
    zonCordArray[67]="242,388,256,399,258,408,259,416,259,418,259,419,253,412,251,408,247,399" 
    zonCordArray[177]="175,348,186,349,192,348,189,361,184,383,176,374,172,366,169,357" 
    zonCordArray[193]="153,385,157,379,163,390,172,404,175,411,177,421,172,456,166,450,164,448,161,445,159,443,158,440,156,439,154,434,152,429,151,425,149,419,148,415,147,410,148,405,148,401,150,392" 
    zonCordArray[69]="184,381,192,348,197,349,223,375,227,388,232,414,234,460,232,506,229,545,227,564,224,584,221,596,220,596,212,596,205,595,200,594,193,586,186,580,172,514,172,456,177,420,201,448,208,443,210,433,193,409,202,405,189,393" 
    zonCordArray[187]="195,589,193,588,187,581,185,577,186,592,185,604,185,612,207,596,201,595" 
    zonCordArray[70]="223,376,241,389,260,420,262,436,266,453,264,473,258,499,252,529,246,558,244,566,244,571,243,578,243,582,241,588,239,597,239,605,237,611,234,619,231,629,227,626,221,621,219,609,223,590,226,579,228,551,231,516,234,473,233,438,231,406,228,395" 
    zonCordArray[73]="264,472,259,495,255,517,252,532,249,545,244,568,242,586,239,600,238,606,234,617,232,625,229,632,236,635,240,637,241,632,244,622,246,612,247,605,248,597,248,588,250,577,251,568,253,555,257,531,262,507,264,494,265,484,266,471,265,467" 
    zonCordArray[75]="184,612,180,619,175,624,173,628,170,632,168,635,166,661,171,699,169,737,164,773,163,797,163,804,165,808,166,810,171,815,183,818,201,822,214,824,222,826,229,828,237,835,237,837,244,841,252,841,258,836,259,832,236,823,206,811,193,800,190,792,188,779,192,756,199,724,207,691,212,670,220,645,230,633,229,628,219,618,219,607,221,597,207,596,197,604" 
    zonCordArray[188]="168,636,157,654,154,662,152,673,150,691,154,722,154,752,153,778,148,796,147,815,153,824,168,835,184,834,206,836,218,840,229,840,241,840,239,836,229,828,216,825,203,823,187,819,173,816,166,811,163,801,164,777,169,735,170,695,167,664,167,646" 
    zonCordArray[79]="147,816,145,824,146,827,151,833,156,835,169,835,158,828" 
    zonCordArray[77]="216,660,220,647,229,633,239,637,235,658,234,700,234,735,234,772,231,793,232,804,240,820,248,827,229,822,214,814,203,809,195,802,198,798,197,777,194,752,206,697,211,675" 
    zonCordArray[78]="233,773,230,798,235,811,240,820,248,828,258,831,258,835,257,836,275,838,284,835,291,837,298,836,304,832,304,829,293,827,281,823,271,817,254,810,241,798,236,791" 
    zonCordArray[1]="215,6,215,28,239,28,244,30,248,33,251,43,253,59,261,57,261,56,267,57,268,59,264,60,267,63,266,67,260,69,272,84,278,83,278,78,274,72,268,63,269,47,265,31,261,23,254,18,243,12,229,7" 
    zonCordArray[131]="257,58,265,58,261,62" 
    zonCordArray[117]="261,62,264,64,265,68,261,68,261,66" 
    zonCordArray[1]="253,58,256,58,260,63,260,69,255,63"  
	}
	
	//BACK
	if (pos==4){
		zonCordArray[86]="400,454,401,476,405,475,405,459,410,479,412,476,415,475,416,471,417,457,419,455,421,465,426,464,427,461,425,453,423,453,418,454,407,455,409,458,405,456" 
		zonCordArray[87]="376,414,384,410,387,416,392,424,395,432,397,440,397,449,399,453,401,476,399,476,396,472,393,448,389,469,387,471,383,467,383,448,381,428" 
		zonCordArray[86]="420,423,427,436,421,439,416,434,413,429,416,426" 
		zonCordArray[8]="334,301,344,302,350,303,352,308,354,317,362,343,374,372,385,409,386,411,378,414,374,402,363,378,349,349,339,320" 
		zonCordArray[85]="374,302,375,317,376,335,383,368,387,384,395,398,388,365,381,321" 
		zonCordArray[84]="310,204,315,216,320,227,325,242,334,263,340,280,342,294,334,301,331,280,318,246,315,230,312,221" 
		zonCordArray[83]="311,206,320,207,327,209,331,224,335,237,340,250,347,272,349,286,343,294,334,264,326,245,319,223" 
		zonCordArray[81]="326,209,330,223,342,256,348,274,349,286,349,287,346,290,345,292,334,300,345,301,350,304,352,311,356,326,363,346,373,369,380,396,388,417,394,428,398,452,402,454,406,455,410,456,414,455,417,455,420,453,423,454,423,453,424,451,423,448,421,443,419,440,418,435,413,429,421,425,417,416,404,407,395,397,389,386,385,376,382,365,380,355,378,338,375,321,374,300,366,283,360,263,346,216,337,212" 
		zonCordArray[94]="96,398,87,429,79,466,84,463,89,436,91,459,95,458,98,452,98,438,99,426,103,418,102,410,105,402" 
		zonCordArray[93]="58,438,55,446,50,454,52,454,54,454,55,457,59,452,63,442,66,442,65,451,63,460,64,467,68,465,71,462,73,454,74,445,79,446,76,453,77,457,77,466,79,466,82,447,79,446,74,445,71,445,66,442,63,441,62,441" 
		zonCordArray[89]="153,301,142,298,136,304,131,313,125,326,118,342,109,368,97,397,106,402,108,394,116,380,129,361,135,350,145,325,148,315,152,305" 
		zonCordArray[9]="114,293,107,313,104,322,101,341,92,380,94,372,100,362,104,349,108,331,113,309" 
		zonCordArray[78]="181,623,182,604,185,620,190,633,190,646,188,666,187,683,190,709,198,747,200,773,202,792,200,804,196,809,190,815,193,806,192,798,194,787,191,770,188,746,183,726,178,692,177,674,177,656,179,636" 
		zonCordArray[119]="205,810,200,817,195,821,189,826,184,831,179,836,200,836,209,836,217,836,220,833,221,827,220,823,211,817" 
		zonCordArray[77]="231,592,216,615,210,630,201,653,201,677,203,694,205,716,208,740,210,760,210,786,205,810,217,822,222,829,222,817,220,805,222,798,221,792,221,790,221,786,220,778,220,763,222,747,224,730,228,708,232,690,236,671,232,650,228,636,228,620" 
		zonCordArray[75]="358,831,344,829,334,827,326,826,313,823,305,815,300,807,297,803,300,768,305,729,307,709,307,690,306,665,305,644,303,625,309,615,320,598,319,602,319,622,322,644,322,656,322,677,318,701,314,732,309,768,308,790,317,801,326,812,341,823,351,826,360,834" 
		zonCordArray[79]="279,816,277,824,277,828,280,835,284,835,298,836,286,823" 
		zonCordArray[188]="303,625,298,636,289,653,288,689,290,722,290,741,288,763,288,779,285,799,283,807,279,817,298,836,354,837,361,837,358,835,362,833,359,834,361,835,362,834,354,830,346,829,329,827,313,822,303,813,298,805,297,800,298,790,301,761,306,719,307,692,306,673,306,658,304,635" 
		zonCordArray[76]="268,590,276,601,280,609,284,620,285,627,288,651,288,682,289,716,290,741,288,766,287,793,278,819,281,782,279,759,277,743,272,718,265,694,264,674,266,662,268,646,271,632,272,618" 
		zonCordArray[187]="317,442,313,446,305,453,300,456,293,459,285,460,277,461,267,462,270,479,270,508,267,534,266,542,267,558,268,577,269,590,281,610,284,620,289,652,301,629,310,613,319,599,321,580,322,559,322,542,320,517,319,503,320,488,322,463,323,450,324,434" 
		zonCordArray[93]="60,411,52,422,52,424,56,426,58,422,61,418,58,416" 
		zonCordArray[88]="167,212,153,215,146,216,139,240,132,259,125,270,121,280,115,290,114,305,111,317,108,334,103,353,95,372,91,381,84,393,77,398,66,405,63,409,58,414,61,422,62,426,61,431,60,433,58,435,59,437,57,438,59,439,62,440,61,440,63,442,68,443,72,445,76,445,82,446,98,393,119,340,129,318,137,302,143,297,152,300,154,298,143,287,141,282,140,272,147,253,156,235" 
		zonCordArray[91]="185,207,157,258,145,288,149,292,153,298,162,278,165,268,173,254,177,239,182,215" 
		zonCordArray[90]="167,212,163,219,160,227,156,234,150,247,146,256,141,270,140,277,141,283,145,288,160,251,184,209,172,210" 
		zonCordArray[80]="188,665,188,684,188,694,189,703,191,713,194,728,196,739,198,750,200,765,201,780,202,792,201,800,199,807,191,814,186,821,180,827,177,833,180,836,190,826,198,819,205,810,207,805,209,791,210,773,210,756,207,730,203,697,201,667,201,653,194,641,190,634,189,651" 
		zonCordArray[118]="180,473,182,458,178,438,189,448,200,456,210,461,220,461,229,462,231,462,230,486,229,498,229,507,230,517,231,532,234,543,232,567,232,577,232,584,231,595,223,604,216,616,210,630,201,654,191,635,182,608,182,594,178,575,179,552,180,532,181,511,181,499,182,484" 
		zonCordArray[74]="167,424,166,430,164,437,162,450,161,475,160,490,163,508,166,530,172,551,178,577,179,545,180,522,182,487,181,468,181,452,177,435,172,430,171,426" 
		zonCordArray[69]="332,426,327,430,324,435,323,461,323,475,321,491,320,504,322,523,323,541,323,577,330,548,332,533,335,521,339,498,339,475,338,458,336,439" 
		zonCordArray[7]="231,462,251,463,247,474,243,487,241,496,239,504,238,513,236,525,233,543,230,523,229,511,229,497,231,480" 
		zonCordArray[71]="251,463,268,462,270,480,270,507,269,522,267,534,266,545,260,516,259,504,254,491,251,475" 
		zonCordArray[180]="249,378,255,382,259,390,263,398,266,404,266,414,265,422,262,430,259,435,253,439,249,440" 
		zonCordArray[179]="249,378,249,441,240,435,238,432,234,424,234,417,234,408,234,399,238,392,241,387,244,383" 
		zonCordArray[184]="259,435,277,434,295,434,300,436,304,439,308,443,312,448,308,451,303,455,295,458,277,461,248,463,248,440,253,439,256,437" 
		zonCordArray[181]="255,384,279,384,295,384,314,384,325,410,331,424,322,438,313,447,306,442,297,434,258,435,264,425,266,418,266,409,264,400,261,393" 
		zonCordArray[193]="312,384,323,384,324,389,326,394,331,423" 
		zonCordArray[177]="302,352,315,352,319,361,320,366,322,372,324,384,315,384,309,370,306,365" 
		zonCordArray[176]="284,352,301,352,305,365,308,371,314,384,300,384,285,384,286,379,285,373,285,367,285,364" 
		zonCordArray[175]="248,339,284,352,285,365,284,371,285,379,285,385,276,384,261,384,257,384,253,382,249,378" 
		zonCordArray[17]="248,341,248,336,273,341,285,343,302,347,314,351,281,351" 
		zonCordArray[170]="246,314,262,315,282,318,295,320,308,322,309,332,316,354,290,344,268,340,253,337,248,337" 
		zonCordArray[168]="245,290,258,291,271,293,288,296,304,302,308,322,291,319,270,316,255,314,245,314" 
		zonCordArray[166]="303,270,308,271,303,286" 
		zonCordArray[165]="243,264,261,264,279,267,295,269,303,271,302,283,304,302,290,297,267,292,252,291,244,291" 
		zonCordArray[183]="239,435,242,437,246,440,249,440,249,462,231,462,211,461,202,457,195,453,192,451,192,448,198,439,201,436,208,434,223,434" 
		zonCordArray[178]="173,412,170,417,168,423,172,429,178,437,187,447,192,449,200,437,205,435,214,434,239,435,234,423,233,416,233,404,235,397,244,384,235,384,207,383,186,383" 
		zonCordArray[194]="176,383,188,383,167,423,171,400" 
		zonCordArray[116]="182,352,180,356,180,362,179,365,176,383,179,383,191,362,197,352,193,352" 
		zonCordArray[173]="196,352,191,363,187,370,180,382,216,383,216,375,216,368,216,352,209,352" 
		zonCordArray[174]="247,337,249,378,246,382,243,382,240,384,216,384,216,384,216,375,216,370,216,362,216,352" 
		zonCordArray[171]="247,336,230,338,214,342,183,351,218,352" 
		zonCordArray[169]="191,321,190,331,188,338,182,352,197,347,213,342,230,338,248,337,245,314,225,315,206,317" 
		zonCordArray[167]="192,302,192,309,191,321,199,318,216,316,232,314,245,314,244,290,223,291,207,292,193,296" 
		zonCordArray[164]="190,269,200,267,217,264,244,263,244,290,223,291,206,292,193,296,190,288,191,279" 
		zonCordArray[114]="184,269,191,268,189,285" 
		zonCordArray[163]="303,251,315,254,309,271,303,270" 
		zonCordArray[195]="246,247,268,247,303,252,302,270,292,269,276,266,261,264,246,264" 
		zonCordArray[196]="190,250,211,247,227,246,247,246,247,264,221,264,205,266,190,268" 
		zonCordArray[113]="178,253,183,268,191,268,190,251" 
		zonCordArray[160]="307,223,315,228,316,239,306,236" 
		zonCordArray[159]="265,232,288,233,306,236,304,252,264,247" 
		zonCordArray[158]="248,232,264,232,264,246,247,246" 
		zonCordArray[157]="227,232,247,232,247,246,226,246" 
		zonCordArray[161]="188,235,208,232,226,232,226,246,207,247,190,251" 
		zonCordArray[11]="177,242,178,248,178,248,179,254,189,251,187,234" 
		zonCordArray[156]="306,236,316,237,316,240,317,246,317,248,315,253,304,251" 
		zonCordArray[155]="264,217,288,221,306,223,306,237,286,233,264,232" 
		zonCordArray[15]="310,208,307,224,315,227,312,220" 
		zonCordArray[151]="264,198,287,201,311,207,308,219,308,223,292,222,264,217" 
		zonCordArray[154]="248,217,264,217,264,232,248,232" 
		zonCordArray[150]="247,198,264,198,264,217,247,217" 
		zonCordArray[153]="227,217,248,217,248,232,227,232" 
		zonCordArray[149]="228,197,247,197,247,217,226,217" 
		zonCordArray[16]="188,226,188,236,208,232,227,232,227,217,201,221" 
		zonCordArray[111]="180,229,178,235,177,241,187,235,187,226" 
		zonCordArray[110]="183,214,188,226,180,228,182,220" 
		zonCordArray[18]="183,208,184,213,187,226,201,221,214,219,227,217,228,197,207,200" 
		zonCordArray[108]="183,189,202,185,214,183,227,183,227,197,210,199,193,204,183,208" 
		zonCordArray[146]="227,175,227,198,247,198,247,175" 
		zonCordArray[147]="264,179,247,179,247,198,264,198" 
		zonCordArray[148]="264,180,286,185,314,190,311,207,291,202,277,200,264,198" 
		zonCordArray[37]="309,172,328,174,341,177,345,188,345,195,346,201,347,206,347,214,347,215,333,211,322,208,311,206,313,192,313,186" 
		zonCordArray[144]="264,163,286,168,309,173,314,190,286,185,264,179" 
		zonCordArray[143]="246,161,264,161,264,179,246,179" 
		zonCordArray[14]="227,162,246,162,246,175,227,175" 
		zonCordArray[107]="188,170,209,165,227,162,227,183,205,184,182,189" 
		zonCordArray[40]="149,181,169,174,188,170,183,185,183,208,174,210,146,216,147,210,146,206,146,202,147,195,148,189" 
		zonCordArray[104]="192,150,168,156,159,159,158,161,154,166,151,176,150,180,188,170" 
		zonCordArray[106]="192,150,208,147,227,147,226,163,209,165,188,170" 
		zonCordArray[138]="227,147,246,147,246,162,226,162" 
		zonCordArray[139]="263,147,255,147,246,147,246,162,264,162" 
		zonCordArray[140]="264,147,287,148,303,150,309,173,286,168,264,164" 
		zonCordArray[141]="301,149,309,172,335,175,342,178,340,173,340,167,338,164,332,156" 
		zonCordArray[134]="269,117,288,128,295,133,305,140,310,142,320,146,324,150,330,154,332,157,332,156,322,153,312,151,306,150,299,147,288,138,281,136,271,135" 
		zonCordArray[137]="261,136,262,147,289,148,305,150,299,148,289,138,283,136,271,136" 
		zonCordArray[105]="194,149,188,150,200,141,205,139,215,136,228,136,228,147,209,147" 
		zonCordArray[103]="221,120,220,136,212,137,200,141,194,146,188,150,178,153,172,154,161,159,161,158,167,151,172,147,184,142,188,140,195,136,202,131,210,125" 
		zonCordArray[136]="246,136,246,147,255,147,263,147,261,136,257,136" 
		zonCordArray[135]="228,136,227,147,235,147,246,147,246,136,234,136" 
		zonCordArray[133]="246,127,259,127,269,127,271,136,246,136" 
		zonCordArray[13]="221,127,220,136,221,136,229,136,246,136,246,127" 
		zonCordArray[131]="246,118,246,127,269,127,268,118" 
		zonCordArray[130]="222,118,221,127,246,127,246,118" 
		zonCordArray[96]="220,15,224,12,229,8,236,5,241,4,248,3,247,84,229,84,229,48,229,37,226,29,225,21" 
		zonCordArray[101]="223,110,246,110,246,118,222,118" 
		zonCordArray[100]="246,110,246,104,223,104,223,110" 
		zonCordArray[99]="222,96,246,96,246,104,223,104" 
		zonCordArray[9]="213,56,211,53,207,55,204,60,205,65,207,73,213,81,217,81,216,67" 
		zonCordArray[7]="283,58,284,54,285,54,289,60,289,67,287,73,284,80,279,81,281,69" 
		zonCordArray[95]="229,96,229,72,229,49,228,31,226,22,222,16,220,15,217,20,214,26,212,34,212,43,213,56,213,59,216,67,218,82,222,96" 
		zonCordArray[129]="246,110,267,110,268,118,246,118" 
		zonCordArray[128]="246,110,267,110,268,104,246,104" 
		zonCordArray[127]="246,96,246,104,268,104,271,96" 
		zonCordArray[121]="241,85,247,85,247,89,241,89" 
		zonCordArray[124]="240,90,247,90,247,93,240,93" 
		zonCordArray[97]="230,89,240,89,240,85,230,85" 
		zonCordArray[98]="246,96,229,96,229,90,239,90,239,93,246,93" 
		zonCordArray[126]="256,90,264,90,264,96,247,96,247,93,256,93" 
		zonCordArray[125]="248,90,248,93,255,93,255,90" 
		zonCordArray[12]="248,85,248,89,255,89,255,85" 
		zonCordArray[123]="255,85,255,89,265,89,265,85" 
		zonCordArray[185]="275,15,281,23,284,31,284,43,283,55,281,65,280,76,277,82,272,96,265,96,266,56,266,30,269,22,272,18" 
		zonCordArray[186]="249,3,259,5,268,11,272,15,274,16,271,20,267,28,266,45,266,84,254,84,247,84"  
	}
	
	return zonCordArray[zonID];
}


function goAnalyze(containerID,gender,mob,mw,email){
	
		//alert("containerID: " + containerID);
		//alert("myPaintPointsValue: " + myPaintPointsValue);
		//alert("myPaintPointsValue.length: " + myPaintPointsValue.length);
		
		if (myPaintPointsValue.length==0){
			alert("Vänligen klicka på det området där du upplever smärta innan du klickar på Klar")	
		}
	
		//------------------------------------------------------------------------------------------------------------------------
		// FOR THE ARRAY myPaintPointsValue 
		//------------------------------------------------------------------------------------------------------------------------
		
		var tmpMyPaintPointsValue = myPaintPointsValue.length;
		if (tmpMyPaintPointsValue>1){
			tmpMyPaintPointsValue = tmpMyPaintPointsValue - 1 //<!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ??????????????????????????????????
		}
		
		if (tmpMyPaintPointsValue>0){
			
			// ----------------------------------------------------------------------------------------------------			
			// Initiate REVOLVER --==',_
			// ----------------------------------------------------------------------------------------------------
			
			var resultMGN = new Array();  
			
			var resultMGN_standAlone = new Array();  // To catch the painpoints with no match

			//Global varaible iCount gives number of paintpoint <------------------------------------- DETTA FÅR MAN VÄLL PÅ ANNAT HÅLL (tmpMyPaintPointsValue)
	
	
			// Define first array of two  of comparison
			var compareA = new Array();
			
			// Indicates if there is any hit
			var foundFlag=0

			
			for (r=0;r<tmpMyPaintPointsValue;r++){
			

				//  CompareA gets the first element in myPaintPointsValue and splits it
				
				var compareA = myPaintPointsValue[0].split(",");  
				
				// Define CompareR as the Resultarray
				var compareR = new Array(); 
				
				// Subtract one as the end value is empty
				var loopTo = parseInt(iCount)-1 //<-------DETTA FÅR MAN VÄLL PÅ ANNAT HÅLL (tmpMyPaintPointsValue) !!!!!!!!!!!!!!!!!!!!!!!!!!!! BEHÖVS DEN???????????????????????????????????
				
				// Loop thru the myPaintPointsValue array
				for (j=0 ;j<loopTo; j++){
					
					// Define second value (String) for comparison  
					var compareB = myPaintPointsValue[j+1] // Search in this string
					
					if (compareB==undefined) {compareB=""}
					
					// Get length of the array to loop thru
					var loopLength = compareA.length;
				
					// Define variable to hold position of any hits  
					var indexFlag = 0;
					
					// Loop thru and compare elements in compareA with String compareB
					for(var a=0; a<loopLength; a++){ 
					
						// Search for match 
						indexFlag = compareB.indexOf(compareA[a]);
						
						//alert("indexFlag " + indexFlag)
						
						// if found elemements from array compareA is found in string CompareB then store value
						if (indexFlag>=0){  
						
							// Save the element in common, in a resultarray - compareR
							compareR.push(compareA[a]); 
						
						}
		
					}
					
					// Save the result for every slug(in the revolver) into a result-array <------------------------------------- KOLLA
					if (compareR !=""){
						resultMGN.push(compareR); 
						foundFlag=1;
					}
					
					// Clear array
					var compareR = new Array();  
			

		}


			// Change order inside myPaintPointsValue - ROTATE REVOLVER
			
			var tmpElement = myPaintPointsValue.shift() // Removes the first element
			
			myPaintPointsValue.push(tmpElement) // Adds new element last in the array
				
			} //-------------------------------------------END REVOLVER for (r=0;r<tmpMyPaintPointsValue;r++)
				
			} //-------------------------------------------END if (tmpMyPaintPointsValue>0)
			


			//------------------------------------------------------------------------------------- 
			// Action to been taken if foundFlag indicates NO HIT ie it is a Standalone Painpoint
			//-------------------------------------------------------------------------------------
			var standAloneNumber=0; // Number of standAlone
			
			if (foundFlag==0){
				resultMGN_standAlone.push(myPaintPointsValue);
				standAloneNumber = myPaintPointsValue.length; // Notes how Many points are markes as Stand alone
			}


//================================================================== NY JÄMFÖRELSE SEGM VS MEDB ============================================================================

		if (myPaintPointsValue_medb.length>0){
			
			// ----------------------------------------------------------------------------------------------------			
			// Initiate REVOLVER --==',_
			// ----------------------------------------------------------------------------------------------------
			
			var resultMGN_segm_VS_medb = new Array();  
			
			var resultMGN_segm_VS_medb_standAlone = new Array();  // To catch the painpoints with no match

			// Brings all element together in one array
			var compareA_ALL = new Array();
			
			var arrPointsPosition=new Array();

						
			for (r=0;r<myPaintPointsValue.length;r++){
				compareA_ALL=compareA_ALL.concat(myPaintPointsValue[r]);
			}

		
			// Define CompareR as the Resultarray
			var compareR = new Array(); 
				
				// Indicates if there is any hit
				var foundFlag=0
				
				// Brings all element together in one array
				var compareB_ALL = new Array()
				
				for (r=0;r<myPaintPointsValue_medb.length;r++){
					compareB_ALL=compareB_ALL.concat(myPaintPointsValue_medb[r]);
				}
				
			var tmpCountElementA_str = compareA_ALL.toString()
			var tmpCountElementA_array = new Array(); 
			var tmpCountElementA_array = tmpCountElementA_str.split(",");
			var loopToA = tmpCountElementA_array.length;

			var tmpCountElementB_str = compareB_ALL.toString()
			var tmpCountElementB_array = new Array(); 
			var tmpCountElementB_array = tmpCountElementB_str.split(",");
			var loopToB = tmpCountElementB_array.length;
	
				// Loop thru A
				for (a=0 ;a<loopToA; a++){
					
					// Define second value (String) for comparison  
					var compareA = tmpCountElementA_array[a] // Search in this string
					
					if (compareA==undefined) {compareA=""}
					
					// Define variable to hold position of any hits  
					var indexFlag = 0;
					
					// Loop thru B and compare
					for (b=0 ;b<loopToB; b++){ 
					
						var compareB = tmpCountElementB_array[b];
					
						// Search for match 
						if (compareB == compareA){
							compareR.push(tmpCountElementA_array[a]); 
						}
		
					}
					
					// Save the result for every slug(in the revolver) into a result-array <------------------------------------- KOLLA
					if (compareR !=""){
						resultMGN_segm_VS_medb.push(compareR); 
					foundFlag=1;
					}
					
					// Transfear back the searchresult to compareA for further investigations
					//compareA = compareR  <------------------------------------------------------------------------------------- INGEN ACTION?
					
					// Clear array
					var compareR = new Array();  
			

			// Change order inside myPaintPointsValue - ROTATE REVOLVER
			
			
			var tmpElement = myPaintPointsValue.shift() // Removes the first element
			
			myPaintPointsValue.push(tmpElement) // Adds new element last in the array
			

				
			} //-------------------------------------------END REVOLVER for (r=0;r<tmpMyPaintPointsValue;r++)	
				
				
			} //-------------------------------------------END if (tmpMyPaintPointsValue>0)
			
			

			var resultMGN_medb="" // <------------------------- TILLFÄLLIGT NEUTRALT VÄRDE

			// Temporary conversion to deal with array filled with duplicate elementgroups ie L1,L2,L1,L2 since resultMGN.sort() seems to sort them in groups! L1,L2,L1,L2 becomes L1,L2,L1,L2
			// The result after foo-treatment works better, L1,L2,L1,L2 becomes L1,L1,L2,L2
			
			//------------------------------------------------------------------------------------------------------------------------
			// FOR THE ARRAY resultMGN
			//------------------------------------------------------------------------------------------------------------------------
			
			var tmpFoo = resultMGN.toString();
			
			var foobar = tmpFoo.split(",");
			
			var resultMGN = foobar;
			
			// Sorts result array in alphabetic order
			
			resultMGN.sort();
			
			//------------------------------------------------------------------------------------------------------------------------
			// FOR THE ARRAY resultMGN_medb
			//------------------------------------------------------------------------------------------------------------------------
			
			var tmpFoo = resultMGN_medb.toString();
			
			var foobar = tmpFoo.split(",");
			
			var resultMGN_medb = foobar;
			
			// Sorts result array in alphabetic order
			
			resultMGN_medb.sort();
			
			//-------------------------------------------------------------
			// Compiles the frequency of every unique element
			//-------------------------------------------------------------
			
			//------------------------------------------------------------------------------------------------------------------------
			// FOR THE finalResult - calcFrequencyPercent
			//------------------------------------------------------------------------------------------------------------------------
			
			// Get length of the array to loop thru
			var loopLength = resultMGN.length;
			
			var compareElement="foo"; // ie nothing
			var finalResult = new Array(); 

			for(var c=0; c<loopLength; c++){
				
				//Find unique element
				if (compareElement!=resultMGN[c].toString()){
					// alert("compareElement " + compareElement);
					// alert("resultMGN[c] " + resultMGN[c]);

					
					compareElement=resultMGN[c];
					finalResult.push(compareElement); // Add unique element
					var calcFrequencyPercent = Math.round((countvalues(resultMGN)[resultMGN[c]]/tmpMyPaintPointsValue) * 100);
					finalResult.push(calcFrequencyPercent); // Add elements frequency
					
				}
			}
			
			
			//------------------------------------------------------------------------------------------------------------------------
			// Clear duplicates
			//------------------------------------------------------------------------------------------------------------------------
			
			// Get length of the array to loop thru
			var loopLength = resultMGN.length;
			
			//alert("loopLength " + loopLength)
			
			var compareElement="foo"; // ie nothing
			var tmp_resultMGN = new Array(); 
			


			for(var c=0; c<loopLength; c++){
				//To add first post
				if (c==0){
				 tmp_resultMGN.push(resultMGN[c])
				}
				// Skip compering with nothing ie c=0-1
				if (c>0){
					// If this is a unique post
					if (resultMGN[c]!=resultMGN[c-1]){
						tmp_resultMGN.push(resultMGN[c]); // Add unique element
					}
				}
			}
			
			// Giva back the cleaned result
			resultMGN = tmp_resultMGN;
			
			//------------------------------------------------------------------------------------------------------------------------
			// FOR THE ARRAY resultMGN_medb
			//------------------------------------------------------------------------------------------------------------------------
			
			// Get length of the array to loop thru
			var loopLength = resultMGN_medb.length;
			
			var compareElement="foo"; // ie nothing
			var finalResult_medb = new Array(); 

			for(var c=0; c<loopLength; c++){
				
				//Find unique element
				if (compareElement!=resultMGN_medb[c].toString()){
					
					compareElement=resultMGN_medb[c];
					finalResult_medb.push(compareElement); // Add unique element
					var calcFrequencyPercent = Math.round((countvalues(resultMGN_medb)[resultMGN_medb[c]]/myPaintPointsValue_medb.length) * 100);
					finalResult_medb.push(calcFrequencyPercent); // Add elements frequency
					
				}
			}
			
			//------------------------------------------------------------------------------------------------------------------------
			// Clear duplicates MEDB
			//------------------------------------------------------------------------------------------------------------------------
			
			// Get length of the array to loop thru
			var loopLength = resultMGN_medb.length;
			
			var compareElement="foo"; // ie nothing
			var tmp_resultMGN_medb = new Array(); 
			


			for(var c=0; c<loopLength; c++){
				//To add first post
				if (c==0){
				 tmp_resultMGN_medb.push(resultMGN_medb[c])
				}
				// Skip compering with nothing ie c=0-1
				if (c>0){
					// If this is a unique post
					if (resultMGN_medb[c]!=resultMGN_medb[c-1]){
						tmp_resultMGN_medb.push(resultMGN_medb[c]); // Add unique element
					}
				}
			}
			
			// Giva back the cleaned result
			resultMGN_medb = tmp_resultMGN_medb;
			
			
			// alert("finalResult " + finalResult);
			
			// alert("finalResult_medb " + finalResult_medb);
			
			
//			alert("resultMGN " + resultMGN);
//			
//			alert("resultMGN_standAlone " + resultMGN_standAlone);
//			
//			alert("resultMGN_segm_VS_medb " + resultMGN_segm_VS_medb);
			
			//alert("resultMGN_standAlone_medb " + resultMGN_standAlone_medb);
			
			
			// KONTROLL OM INGET MGN ALLS HITTAS. DÅ SLÄPPS STRÄNGARNA IGENOM MED EN FLAGGA SOM TALAR OM ATT RESULTATEN SKA REDOVISAS SEPARAT
			
			
			// Last correction: Hit in Segm VS MEDB goes prior to resultMGN_standAlone
			
			//if (resultMGN_segm_VS_medb!="" && resultMGN==""){
//				resultMGN=resultMGN_segm_VS_medb;
//				resultMGN_standAlone="";
//			}
			
				
			// Display result 
			
				var url="champResult.asp?resultMGN=" + resultMGN + "&resultMGN_standAlone=" + resultMGN_standAlone + "&standAloneNumber=" + standAloneNumber + "&resultMGN_segm_VS_medb=" + resultMGN_segm_VS_medb + "&gender=" + gender + "&email=" + email;
				window.location.href = url;
			
}


function countvalues(a) {
var b = {}, i = a.length, j;
while( i-- ) {
j = b[a[i]];
b[a[i]] = j ? j+1 : 1;
}
return b; // an object of element:count arrays
}



function goAnalyze_KACIVE(){
	
		if (tmpMyPaintPointsValue>0){
		
		//Global varaible iCount gives number of paintpoint

		 // i sets to 1 to pick up the First post		
		var i=0 

		// Define first array of two  of comparison
		var compareA = new Array();
		
		// Split CompareA for use of the indivdual elements
		var compareA = myPaintPointsValue[i].split(",");   
		
		//alert(compareA)

		// Define CompareR as the Resultarray
		var compareR = new Array(); 
		
		// Subtract one as the end value is empty
		var loopTo = parseInt(iCount)-1
		
		// Loop thru the myPaintPointsValue array
		for (j=0 ;j<loopTo; j++){
			
			// Define second value (String) for comparison  
			var compareB = myPaintPointsValue[j+1] // Search in this string
			
			// Get length of the array to loop thru
			var loopLength = compareA.length;
		
			// Define variable to hold position of any hits  
			var indexFlag = 0;
			
			// Loop thru and compare elements in compareA with String compareB
			for(var a=0; a<loopLength; a++){ 
			
				// Search for match 
				indexFlag = compareB.indexOf(compareA[a]);
				
				// if found elemements from array compareA is found in string CompareB then store value
				if (indexFlag>=0){  
				
					// Save the element in common, in a resultarray - compareR
					compareR.push(compareA[a]); 
				
				}

			}
			
			// Transfear back the searchresult to compareA for further investigations
			compareA = compareR 
			
			// Clear array
			var compareR = new Array(); 
	
		}
			
		// Display result
		var url="champResult_KACIVE.asp?compareA=" + compareA;
		window.location.href = url;
	
		//// alert("Result: " + compareA)
		}

}







function magnifierCHAMP(){
	document.body.style.cursor = "crosshair";
}

function backFront(){
	url="champ.asp"	
	window.location.href=url;
}

function goArea(zonID){
	// alert("just oneClick")
}

function paintPoint(zonID){
	// alert("Har sparat id för zon " + zonID)
}


// =========== Mall

function demo(variabelA,variabelB){ 
	tmpTarget = VadSomSkaUppdateras;
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url="sida.asp?variabelA=" + variabelA + "&variabelB=" + variabelB + "";
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=updatedTarget 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

// =========== Funktioner för uppdatering

function infoUpdated() 
{ 
	document.getElementById(tmpTarget).style.borderWidth = "2px"
	document.getElementById(tmpTarget).style.borderStyle = "solid"
	document.getElementById(tmpTarget).style.borderColor = "#00cc00"

}

function redFrame() 
{ 
	document.getElementById(tmpTarget).style.borderWidth = "2px"
	document.getElementById(tmpTarget).style.borderStyle = "solid"
	document.getElementById(tmpTarget).style.borderColor = "#ff0000"

}

function updatedTarget() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById(tmpTarget).innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}


// ================================================== STRING FUNCTIONS

function Left(str, n)
        /***
                IN: str - the string we are LEFTing
                    n - the number of characters we want to return

                RETVAL: n characters from the left side of the string
        ***/
        {
                if (n <= 0)     // Invalid bound, return blank string
                        return "";
                else if (n > String(str).length)   // Invalid bound, return
                        return str;                // entire string
                else // Valid bound, return appropriate substring
                        return String(str).substring(0,n);
        }
		

function Mid(str, start, len)
        /***
                IN: str - the string we are LEFTing
                    start - our string's starting position (0 based!!)
                    len - how many characters from start we want to get

                RETVAL: The substring from start to start+len
        ***/
        {
                // Make sure start and len are within proper bounds
                if (start < 0 || len < 0) return "";

                var iEnd, iLen = String(str).length;
                if (start + len > iLen)
                        iEnd = iLen;
                else
                        iEnd = start + len;

                return String(str).substring(start,iEnd);
        }


// Keep in mind that strings in JavaScript are zero-based, so if you ask
// for Mid("Hello",1,1), you will get "e", not "H".  To get "H", you would
// simply type in Mid("Hello",0,1)

// You can alter the above function so that the string is one-based.  Just
// check to make sure start is not <= 0, alter the iEnd = start + len to
// iEnd = (start - 1) + len, and in your final return statement, just
// return ...substring(start-1,iEnd)


function Right(str, n)
        /***
                IN: str - the string we are RIGHTing
                    n - the number of characters we want to return

                RETVAL: n characters from the right side of the string
        ***/
        {
                if (n <= 0)     // Invalid bound, return blank string
                   return "";
                else if (n > String(str).length)   // Invalid bound, return
                   return str;                     // entire string
                else { // Valid bound, return appropriate substring
                   var iLen = String(str).length;
                   return String(str).substring(iLen, iLen - n);
                }
        }
		

