genMap2.prototype.setNavigationLeft = function (n)
{
  var cDiv = "compasDiv_" + this.divName ;
  var nav  = document.getElementById(cDiv);
  nav.style.left = (5 + n) + 'px';
  nav.style.top = 5 + 'px' ;
  nav.style.zIndex = "999999" ;	
	nav.style.visibility = 'visible' ;
}

genMap2.prototype.setNavigation = function ()
{
	var pDiv = "canvasDiv_" + this.divName ;
	var cDiv = "compasDiv_" + this.divName ;
	if (!document.getElementById(cDiv))
	{
		createNewLayer(pDiv,cDiv) ;
	}	

	var nav = document.getElementById(cDiv) ;
	nav.innerHTML = "" ;
	nav.style.position = 'absolute' ;
	nav.style.left = 5 + 'px' ;
	nav.style.top = 5 + 'px' ;
	nav.style.zIndex = "999999" ;	
	nav.style.visibility = 'visible' ;

	var fishBoneDiv = document.createElement("div") ;
	fishBoneDiv.id = "fishbone_" + this.divName;
	fishBoneDiv.style.position = 'absolute' ;
	fishBoneDiv.style.left = 0 + 'px' ;
	fishBoneDiv.style.top = 0 + 'px' ;	
	fishBoneDiv.style.visibility = 'visible' ;	
	fishBoneDiv.obj = this ;
	fishBoneDiv.style.opacity = 80 / 100 ;
	fishBoneDiv.onmouseover = function ()
	{
		this.obj.showToolTip(this.obj) ;
	}
	fishBoneDiv.onmouseout = function ()
	{
		if (document.getElementById("tooltip_" + this.obj.divName))
		{
			var toolTipDiv = document.getElementById("tooltip_" + this.obj.divName) ;
			toolTipDiv.style.display = "none" ;
		}
	}
	var fishBoneImg = document.createElement("img") ;
	fishBoneImg.id = "fishbone_img_" + this.divName;
	fishBoneImg.src = imageURL + "images/fishbone.gif" ;
	fishBoneImg.style.left = 0 + 'px' ;
	fishBoneImg.style.top = 0 + 'px' ;	
	fishBoneImg.style.visibility = 'visible' ;
	fishBoneImg.style.display    = '';
	fishBoneDiv.mapObj = this ;
//	fishBoneDiv.onclick = this.getlevel ;

	var zoomOutImg = document.createElement("img") ;
	zoomOutImg.src = imageURL + "images/zoom_out_rest.gif" ;
	zoomOutImg.style.left = 0 + 'px' ;
	zoomOutImg.style.top = 0 + 'px' ;	
	zoomOutImg.style.visibility = 'visible' ;
	zoomOutImg.style.display    = '';
	var zoomOutDiv = document.createElement("div") ;
	zoomOutDiv.style.position = 'absolute' ;
	zoomOutDiv.style.left = 9 + 'px' ;
	zoomOutDiv.style.top = 175 + 'px' ;	
	zoomOutDiv.style.visibility = 'visible' ;	
	zoomOutDiv.style.display    = '';
	zoomOutDiv.obj = this ;
	zoomOutDiv.onmouseover = function ()
	{
		this.obj.showToolTip(this.obj) ;
	}
	zoomOutDiv.onmouseout = function ()
	{
		if (document.getElementById("tooltip_" + this.obj.divName))
		{
			var toolTipDiv = document.getElementById("tooltip_" + this.obj.divName) ;
			toolTipDiv.style.display = "none" ;
		}
	}
	zoomOutDiv.onclick = function (e)
	{
		if(this.obj.level > 1)
		{
			var lvl = parseInt(this.obj.level) - 1 ;
			this.obj.thumbStartAnimation(this.obj.level, -1) ;
			this.obj.changeLevel (lvl, this.obj.getCurrLong(), this.obj.getCurrLat()) ;							
		}		
	}
	zoomOutDiv.onmousedown = function(e)
	{
		zoomOutImg.src = imageURL + "images/zoom_out_pres.gif" ;
	}
	zoomOutDiv.onmouseup = function(e)
	{
		zoomOutImg.src = imageURL + "images/zoom_out_rest.gif" ;
	}


	var zoomInImg = document.createElement("img") ;
	zoomInImg.src = imageURL + "images/zoom_in_rest.gif" ;
	zoomInImg.style.left = 0 + 'px' ;
	zoomInImg.style.top = 0 + 'px' ;	
	zoomInImg.style.visibility = 'visible' ;
	var zoomInDiv = document.createElement("div") ;
	zoomInDiv.style.position = 'absolute' ;
	zoomInDiv.style.left = 9 + 'px' ;
	zoomInDiv.style.top = 32 + 'px' ;	
	zoomInDiv.style.visibility = 'visible' ;
	zoomInDiv.obj = this ;
	zoomInDiv.onmouseover = function ()
	{
		this.obj.showToolTip(this.obj) ;
	}
	zoomInDiv.onmouseout = function ()
	{
		if (document.getElementById("tooltip_" + this.obj.divName))
		{
			var toolTipDiv = document.getElementById("tooltip_" + this.obj.divName) ;
			toolTipDiv.style.display = "none" ;
		}
	}
	zoomInDiv.onclick = function (e)
	{	
		if(this.obj.level < this.obj.MaxLevel)
		{
			var lvl = parseInt(this.obj.level) + 1 ;
			this.obj.thumbStartAnimation(this.obj.level, 1) ;
			this.obj.changeLevel (lvl, this.obj.getCurrLong(), this.obj.getCurrLat()) ;
		}	
	}
	zoomInDiv.onmousedown = function(e)
	{
		zoomInImg.src = imageURL + "images/zoom_in_pres.gif" ;
	}
	zoomInDiv.onmouseup = function(e)
	{
		zoomInImg.src = imageURL + "images/zoom_in_rest.gif" ;
	}	

	var zoomThumbDiv = document.createElement("div") ;
	zoomThumbDiv.id = "zoomThumb_" + this.divName ;
	zoomThumbDiv.style.position = 'absolute' ;
	zoomThumbDiv.style.left = 7 + 'px' ;
	zoomThumbDiv.style.top = 20 + 'px' ;	

	zoomThumbDiv.style.visibility = 'visible';
  zoomThumbDiv.style.display    = '';		
	zoomThumbDiv.obj = this ;
	zoomThumbDiv.onmousedown = this.thumbMoveStart ;
	zoomThumbDiv.onmousemove = this.thumbMove ;
	zoomThumbDiv.onmouseup = this.thumbMoveStop ;
	var zoomThumbImg = document.createElement("img") ;
	zoomThumbImg.id = "zoomThumbImg_" + this.divName ;
	zoomThumbImg.src = imageURL + "images/zoom_thumb_rest.gif" ;
	zoomThumbImg.style.left = 0 + 'px' ;
	zoomThumbImg.style.top = 0 + 'px' ;	
	zoomThumbImg.style.visibility = 'visible' ;
	zoomThumbImg.style.display    = '';
	zoomThumbDiv.onmouseover = function ()
	{
		this.obj.showToolTip(this.obj) ;
	}
	zoomThumbDiv.onmouseout = function ()
	{
		if (document.getElementById("tooltip_" + this.obj.divName))
		{
			var toolTipDiv = document.getElementById("tooltip_" + this.obj.divName) ;
			toolTipDiv.style.display = "none" ;
		}		
	}
	zoomThumbDiv.onmouseout = this.thumbMoveStop ;

	nav.appendChild (fishBoneDiv) ;
	nav.appendChild (zoomOutDiv) ;
	nav.appendChild (zoomInDiv) ;
	nav.appendChild (zoomThumbDiv) ;
	fishBoneDiv.appendChild (fishBoneImg) ;
	zoomOutDiv.appendChild (zoomOutImg) ;
	zoomInDiv.appendChild (zoomInImg) ;
	zoomThumbDiv.appendChild (zoomThumbImg) ;
	this.setThumbPosition() ;
	this.showToolTipAusway() ;

	this.showCompass() ;
	this.setNavigationLeft(navLeft);
}

genMap2.prototype.getlevel = function (e)
{
	var documentbodyscrollTop = (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;
//  var tmpY = (window.stop) ? e.clientY : event.clientY ;
//	alert(document.getElementById(this.mapObj.divName).offsetTop + "," + parseInt(document.getElementById("compasDiv_" + this.mapObj.divName).style.top)+ "," + documentbodyscrollTop);

	if (this.mapObj.browser) 
	{
        pos_y = e.offsetY?(e.offsetY):e.pageY-document.getElementById(this.mapObj.divName).offsetTop-parseInt(document.getElementById("compasDiv_" + this.mapObj.divName).style.top)+documentbodyscrollTop;
	} 
	else 
	{
		pos_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById(this.mapObj.divName).offsetTop-parseInt(document.getElementById("compasDiv_" + this.mapObj.divName).style.top)+documentbodyscrollTop;
	}

	var zoomThumbDiv = document.getElementById("zoomThumb_" + this.mapObj.divName) ;		
	zoomThumbDiv.style.top= pos_y - (parseInt(zoomThumbDiv.offsetHeight)/2) + 'px' ;
	zoomThumbDiv.style.visibility = 'visible';
	zoomThumbDiv.style.display    = '';
}


genMap2.prototype.showToolTip = function (obj)
{
	var nav = document.getElementById("compasDiv_" + this.divName) ;
	
	if (!document.getElementById("tooltip_" + obj.divName))
	{
		var toolTipDiv = document.createElement ("div") ;
		toolTipDiv.style.position = "absolute" ;
		toolTipDiv.id = "tooltip_" + obj.divName ;
		toolTipDiv.style.opacity = 80 / 100 ;

		var toolTipImg1 = document.createElement ("img") ;
		toolTipImg1.style.position = "absolute" ;
		toolTipImg1.src = imageURL + "images/zoom_tooltip_nation.gif" ;
		toolTipImg1.style.left = 25 + 'px' ;
		toolTipImg1.style.top = 148 + 'px' ;

		var toolTipImg2 = document.createElement ("img") ;
		toolTipImg2.style.position = "absolute" ;
		toolTipImg2.src = imageURL + "images/zoom_tooltip_state.gif" ;
		toolTipImg2.style.left = 25 + 'px' ;
		toolTipImg2.style.top = 125 + 'px' ;

		var toolTipImg3 = document.createElement ("img") ;
		toolTipImg3.style.position = "absolute" ;
		toolTipImg3.src = imageURL + "images/zoom_tooltip_city.gif" ;
		toolTipImg3.style.left = 25 + 'px' ;
		toolTipImg3.style.top = 105 + 'px' ;

		var toolTipImg4 = document.createElement ("img") ;
		toolTipImg4.style.position = "absolute" ;
		toolTipImg4.src = imageURL + "images/zoom_tooltip_street.gif" ;
		toolTipImg4.style.left = 25 + 'px' ;
		toolTipImg4.style.top = 50 + 'px' ;

		toolTipDiv.appendChild(toolTipImg1) ;
		toolTipDiv.appendChild(toolTipImg2) ;
		toolTipDiv.appendChild(toolTipImg3) ;
		toolTipDiv.appendChild(toolTipImg4) ;	
	
		nav.appendChild(toolTipDiv) ;
	}

	var toolTipDiv = document.getElementById("tooltip_" + obj.divName) ;
	toolTipDiv.style.display = "" ;
}

genMap2.prototype.showToolTipAusway = function ()
{
  var nav = document.getElementById("compasDiv_" + this.divName) ;
  if (nav) 
  {        
    if (this.ausway == 1)
    {    
    	if(!document.getElementById("tooltip_ausway" + this.divName))
    	{
        var TA = document.createElement("div") ;
        TA.id = "tooltip_ausway" + this.divName ;
        TA.style.position = "absolute" ;
        
        var tAusway1 = document.createElement ("img") ;
        tAusway1.style.position = "absolute" ;
        tAusway1.src = imageURL + "images/icon_ausway.gif" ;
        tAusway1.style.left = 25 + 'px' ;
        tAusway1.style.top = 64 + 'px' ;
        
        TA.appendChild(tAusway1) ;	        
        
        var tAusway1 = document.createElement ("img") ;
        tAusway1.style.position = "absolute" ;
        tAusway1.src = imageURL + "images/icon_ausway.gif" ;
        tAusway1.style.left = 25 + 'px' ;
        tAusway1.style.top = 74 + 'px' ;
        
        TA.appendChild(tAusway1) ;	    
       
        var tAusway1 = document.createElement ("img") ;
        tAusway1.style.position = "absolute" ;
        tAusway1.src = imageURL + "images/icon_ausway.gif" ;
        tAusway1.style.left = 25 + 'px' ;
        tAusway1.style.top = 84 + 'px' ;	
        
        TA.appendChild(tAusway1) ;
        
        nav.appendChild(TA) ;   
      }	 
      var TA = document.getElementById("tooltip_ausway" + this.divName) ;
      TA.style.visibility = 'visible' ;
      TA.style.display = '' ;       
    }
    else
    {
      if(document.getElementById("tooltip_ausway" + this.divName))
      {
        var TA = document.getElementById("tooltip_ausway" + this.divName) ;
        TA.style.visibility = 'hidden' ;
        TA.style.display = 'none' ;
      }
    }
  }  
}

var beginThumbPos;
genMap2.prototype.thumbMoveStart = function (e)
{
	this.thumbFlag = 1 ;
	this.browser   = document.getElementById&&!document.all;
	var zoomThumbImg = document.getElementById("zoomThumbImg_" + this.obj.divName) ;		
	zoomThumbImg.src = imageURL + "images/zoom_thumb_pres.gif" ;
	var zoomThumbDiv = document.getElementById("zoomThumb_" + this.obj.divName) ;
  beginThumbPos = zoomThumbDiv.style.top;
	this.startThumbY = (this.browser) ? parseInt(e.clientY,10) : parseInt(event.clientY,10) ;	
	return false ;
}

genMap2.prototype.thumbMove = function (e) 
{
	var zoomThumbDiv = document.getElementById("zoomThumb_" + this.obj.divName) ;

	if (this.thumbFlag == 1 )
	{
		if (parseInt(zoomThumbDiv.style.top) >= 45 && parseInt(zoomThumbDiv.style.top) <= 160)
		{
			var moveY = (this.browser) ? parseInt(e.clientY,10) : parseInt(event.clientY,10) ;					
			zoomThumbDiv.style.top = parseInt(zoomThumbDiv.style.top) + (parseInt(moveY,10) - parseInt(this.startThumbY,10)) + 'px' ;		
			this.startThumbY = moveY ;	

			if (parseInt(zoomThumbDiv.style.top) > 160)
			{
				zoomThumbDiv.style.top = 160 + 'px' ;
			}

			if (parseInt(zoomThumbDiv.style.top) < 45 )
			{
				zoomThumbDiv.style.top = 45 + 'px' ;
			}
		}
	}	
  zoomThumbDiv.style.visibility = 'visible';
  zoomThumbDiv.style.display    = '';			
	return false ;
}

genMap2.prototype.thumbMoveStop = function (e)
{
	this.thumbFlag = 0 ;
	var zoomThumbImg = document.getElementById("zoomThumbImg_" + this.obj.divName) ;		
	zoomThumbImg.src = imageURL + "images/zoom_thumb_rest.gif" ;
	this.obj.checkThumbLevel () ;
	return false ;
}

genMap2.prototype.checkThumbLevel = function ()
{
	var zoomThumbDiv = document.getElementById("zoomThumb_" + this.divName) ;	
	zoomThumbDiv.style.visibility = 'visible';
  zoomThumbDiv.style.display    = '';		
	var oldLevel = this.level ;
	var newLevel = this.changeToLevelThumb ( parseInt(zoomThumbDiv.style.top) ) ;	
	if (oldLevel != newLevel)
	{
		if (newLevel != 0 && newLevel < this.MaxLevel)
		{
			this.changeLevel (newLevel, this.getCurrLong(), this.getCurrLat()) ;
			//this.getRowCol () ;
			//this.getCenter() ;			
		} else {
      zoomThumbDiv.style.top = beginThumbPos;
    }
	}	
}

genMap2.prototype.thumbStartAnimation = function (level, flag)
{
	window.level = level ;
	window.flag = flag ;
	window.obj = this ;
	window.setTimeout (function()
	{
		if (window.flag == 1)
			var lvl = window.level + 1
		else
			var lvl = window.level - 1 ;
		this.obj.thumbAnimation(window.level, lvl, window.flag) ;		
	},1) ;
}

genMap2.prototype.thumbAnimation = function (oldLevel, newLevel, flag)
{	
	var zoomThumbDiv = document.getElementById("zoomThumb_" + this.divName) ;
	var oy = parseInt(zoomThumbDiv.style.top) ;
	var ny = this.changeToPosYThumb( newLevel ) ;

	if (flag == 1)
	{
		for (var i = oy ; i < ny ; i++ )
		{						
			window.obj = this ;
			window.setTimeout( function ()
			{
				var zoomThumbDiv = document.getElementById("zoomThumb_" + this.obj.divName) ;
				zoomThumbDiv.style.top = parseInt(zoomThumbDiv.style.top) + 1 + 'px' ;				
			}, 100) ;			
		} 
	}
	else
	{		
		for (var i = ny ; i < oy ; i++ )
		{						
			window.obj = this ;
			window.setTimeout( function ()
			{
				var zoomThumbDiv = document.getElementById("zoomThumb_" + this.obj.divName) ;
				zoomThumbDiv.style.top = parseInt(zoomThumbDiv.style.top) - 1 + 'px' ;				
			}, 100) ;			
		} 				
	}
}

genMap2.prototype.setThumbPosition = function ()
{
	var y = this.changeToPosYThumb( parseInt(this.level) ) ;
	var zoomThumbDiv = document.getElementById("zoomThumb_" + this.divName) ;
	zoomThumbDiv.style.top = y + 'px' ;
	zoomThumbDiv.style.visibility = 'visible';
  zoomThumbDiv.style.display    = '';		
}

genMap2.prototype.changeToPosYThumb = function (level)
{
	var y = 0 ;
	switch ( parseInt(level) )
	{
		case 1 :
			y = 160 ;
			break ;
		case 2 :
			y = 153 ;
			break ;
		case 3 :
			y = 146 ;
			break ;
		case 4 :
			y = 139 ;
			break ;			
		case 5 :
			y = 132 ;
			break ;
		case 6 :
			y = 125 ;
			break ;
		case 7 :
			y = 118 ;
			break ;
		case 8 :
			y = 111 ;
			break ;
		case 9 :
			y = 104 ;
			break ;
		case 10 :
			y = 97 ;
			break ;
		case 11 :
			y = 90 ;
			break ;
		case 12 :
			y = 83 ;
			break ;
		case 13 :
			y = 76 ;
			break ;
		case 14 :
			y = 69 ;
			break ;
		case 15 :
			y = 62 ;
			break ;
		case 16 :
			y = 55 ;
			break ;
		case 17 :
			y = 48 ;
			break ;
		case 18 :
			y = 41 ;
			break ;
		case 19 :
			y = 34 ;
			break ;	      		
	}
	return y ;
}

genMap2.prototype.changeToLevelThumb = function (top)
{
	var newLevel = 0 ;

	if (parseInt(top) > 153 && parseInt(top) <= 160)
	{
		newLevel = 1 ;			
	}	
	else if (parseInt(top) > 146 && parseInt(top) <= 153)
	{
		newLevel = 2 ;			
	}	
	else if (parseInt(top) > 139 && parseInt(top) <= 146)
	{
		newLevel = 3 ;			
	}	  	
	else if (parseInt(top) > 132 && parseInt(top) <= 139)
	{
		newLevel = 4 ;
	}
	else if (parseInt(top) > 125 && parseInt(top) <= 132)
	{
		newLevel = 5 ;
	}
	else if (parseInt(top) > 118 && parseInt(top) <= 125)
	{
		newLevel = 6 ;
	}
	else if (parseInt(top) > 111 && parseInt(top) <= 118)
	{
		newLevel = 7 ;
	}
	else if (parseInt(top) > 104 && parseInt(top) <= 111) 
	{
		newLevel = 8 ;
	}
	else if (parseInt(top) > 97 && parseInt(top) <= 104) 
	{
		newLevel = 9 ;
	}
	else if (parseInt(top) > 90 && parseInt(top) <= 97) 
	{
		newLevel = 10 ;
	}
	else if (parseInt(top) > 83 && parseInt(top) <= 90) 
	{
		newLevel = 11 ;
	}
  else if (parseInt(top) > 76 && parseInt(top) <= 83) 
	{
		newLevel = 12 ;
	}
  else if (parseInt(top) > 69 && parseInt(top) <= 76) 
	{
		newLevel = 13 ;
	}
  else if (parseInt(top) > 62 && parseInt(top) <= 69) 
	{
		newLevel = 14 ;
	}
  else if (parseInt(top) > 55 && parseInt(top) <= 62) 
	{
		newLevel = 15 ;
	}
  else if (parseInt(top) > 48 && parseInt(top) <= 55) 
	{
		newLevel = 16 ;
	}
  else if (parseInt(top) > 41 && parseInt(top) <= 48) 
	{
		newLevel = 17 ;
	}
	else if (parseInt(top) > 34 && parseInt(top) <= 41) 
	{
		newLevel = 18 ;
	}
	else if (parseInt(top) >= 27 && parseInt(top) <= 34) 
	{
		newLevel = 19 ;
	}          	
	return newLevel ;
}


/*===============================================C O M P A S S================================================================*/

genMap2.prototype.showCompass = function ()
{
	var cDiv = "compasDiv_" + this.divName ;
	var nav = document.getElementById(cDiv) ;

	var compDiv = document.createElement ("div") ;
	compDiv.style.position = 'absolute' ;
	compDiv.style.width = 30 + 'px' ;
	compDiv.style.height = 30 + 'px' ;
	compDiv.style.left = 1 + 'px' ;
	compDiv.style.top = 1 + 'px' ;
	nav.appendChild (compDiv) ;

	var lenY = 0 ;
	var flag = 1 ;
	for ( var i = 1 ; i < 4 ; i ++ )
	{
		var lenX = 0 ;
		for ( var j = 1 ; j < 4 ; j ++ )
		{
			var id = "compass_" + i + "_" + j + this.divName ;
			if (!document.getElementById(id))
			{
				var img = document.createElement ("img") ;
				img.src = imageURL + "images/compass"+ i + "" + j +".gif" ;
				img.style.position = 'absolute' ;
				img.style.left = parseInt(lenX) + 'px' ;
				img.style.top = parseInt(lenY) + 'px' ;
				img.id = id ;
				img.obj = this ;
				img.flag = flag ;
				img.i = i ;
				img.j = j ;
				img.onclick = function ()
				{
				  if ( this.obj.genmapClickAction != 1 ) return;
				  this.obj.flagAnim = 1;
					// set arah horizontal
					if(this.flag == 1 || this.flag == 4 || this.flag == 7) // kiri
					{
						this.obj.xNext = Math.round(this.obj.xCenter - this.obj.width/2) ;
					}
					else if(this.flag == 2 || this.flag == 8)  // tengah
					{
						this.obj.xNext = Math.round(this.obj.xCenter) ;
					}
					else if(this.flag == 3 || this.flag == 6 || this.flag == 9)  // kanan
					{
						this.obj.xNext = Math.round(this.obj.xCenter + this.obj.width/2) ;						
					}

					// set arah vertikal
					if(this.flag == 1 || this.flag == 2 || this.flag == 3)  // atas
					{
						this.obj.yNext = Math.round(this.obj.yCenter - this.obj.height/2) ;								
					}
					else if(this.flag == 4 || this.flag == 6)  // tengah
					{
						this.obj.yNext = Math.round(this.obj.yCenter) ;
					}
					else if(this.flag == 7 || this.flag == 8 || this.flag == 9)  // bawah
					{
						this.obj.yNext = Math.round(this.obj.yCenter + this.obj.height/2) ;												
					}

					//ini untuk navigasi tengah
					if(this.flag == 5)
					{
						var pix = this.obj.changeToPixel (this.obj.longitude,this.obj.latitude) ;						
						this.obj.xNext = pix[0] ; 
						this.obj.yNext = pix[1] ; 	
						this.obj.movX = 0 ;
						this.obj.movY = 0 ;
					}

					this.obj.xNext = this.obj.xNext - this.obj.xStart ;
					this.obj.yNext = this.obj.yNext - this.obj.yStart ;
					this.obj.checkAnimation () ;
				}
				img.onmousedown = function ()
				{
					this.src = imageURL + "images/compass"+ this.i + "" + this.j +"_pres.gif" ;
				}
				img.onmouseup = function ()
				{
					this.src = imageURL + "images/compass"+ this.i + "" + this.j +".gif" ;
				}
				compDiv.appendChild (img) ;
				lenX = lenX + 10 ;
				flag = flag + 1 ;
			}
		}
		lenY = lenY + 10 ;
	}
}

