function genMap2 (divName)
{
	genMap.call(this, divName) ;
	this.navigationAble = false ;
	this.buttonTypeAble = false ;
	this.MapReferenceAble = false ;
	this.genmapClickAction = 1;
  
//  window.setTimeout('getUrlLayer()',1000) ;	

	//this.navigationAble = true ;
	//this.navigationPosition = "left,top" ;
}

genMap2.prototype = new genMap () ;

genMap2.prototype.setGenmapClickAction = function(n)
{
  this.genmapClickAction = n;
}

genMap2.prototype.setNavigationAble = function (navigationAble)
{
	this.navigationAble = navigationAble ;
}

genMap2.prototype.setMapReference = function (MapReferenceAble)
{
	this.MapReferenceAble = MapReferenceAble ;
}

genMap2.prototype.setNavigationPosition = function (navigationPosition)
{
	this.navigationPosition = navigationPosition ;
}

genMap2.prototype.setButtonTypeAble = function (buttonTypeAble)
{
	this.buttonTypeAble = buttonTypeAble ;
}

genMap2.prototype.getNavigationAble = function ()
{
	return this.navigationAble ;
}


genMap2.prototype.getNavigationPosition = function ()
{
	return this.navigationPosition ;
}

genMap2.prototype.getMapReference = function ()
{
	return this.MapReferenceAble ;
}

genMap2.prototype.getButtonTypeAble = function ()
{
	return this.buttonTypeAble ;
}

genMap2.prototype.setMapStar = function (mapStar)
{
	this.mapStar = mapStar ;
}


function GM_Point()
{
  this.Long = 0 ;
	this.Lat  = 0 ;
	this.X    = 0 ;
	this.Y    = 0 ;
}


function GM_SetLine(MyCanvas,Thick,Color,X1,Y1,X2,Y2) {
	MyCanvas.setColor(Color); 
	MyCanvas.setStroke(Thick);
	MyCanvas.drawLine(X1,Y1,X2,Y2);
	MyCanvas.paint();
}

genMap2.prototype.start = function()
{
	this.initCenter() ;
	this.setCanvas() ;	
	this.getRowCol() ;
	this.getCenter() ;
	this.setType() ;

  
    if (this.navigationAble == true)
	{
  	this.setNavigation() ;
	}
	// add by BK
    if (this.MapReferenceAble == true)
	{
	  this.setMapInfo(); 
	}
	if (this.buttonTypeAble == true)
	{
		this.setButtonType() ;
	}

	if (this.mapStar == true)
	{
		this.showStar();
	}
  	  	
//	LayerDraw = new jsGraphics('GM_DrawingLayer1');
//	LayerDraw.clear();
	
	var temp;
	
	var TL  = new GM_Point();
	TL.Long = this.getLeft();
	TL.Lat  = this.getTop();
	temp    = this.changeToPixel(TL.Long, TL.Lat);
	TL.X    = temp[0];
  TL.Y    = temp[1];
  
	var BR  = new GM_Point();
	BR.Long = this.getRight();
	BR.Lat  = this.getBottom();
	temp    = this.changeToPixel(BR.Long, BR.Lat);
	BR.X    = temp[0];
  BR.Y    = temp[1];

  //alert("TL.X = " + TL.X + " | TL.Y = " + TL.Y + " =|= BR.X = " + BR.X + " | BR.Y = " + BR.Y);
  //alert(this.xCurr + " | " + this.yCurr + " === " + this.xCenter + " | " + this.yCenter + " === " + this.xStart + " | " + this.yStart);
  //GM_SetLine(LayerDraw, 2, "#CC0066", TL.X-this.xStart,TL.Y-this.yStart, BR.X-this.xStart,BR.Y-this.yStart );
  //GM_SetLine(LayerDraw, 2, "#CC0066", 100,-100,-100,100 );

}

