var x = xOrg; //Starting Location - left
var y = yOrg; //Starting Location - top
var dest_x = xEnd;  //Ending Location - left
var dest_y = yEnd;  //Ending Location - top
var divIn = 0;

function moveDiv() {
	//Keep on moving the Div till the target is achieved
	if(x<dest_x) x = x + interval; 
	if(y<dest_y) y = y + interval;
	
	//Move the Div to the new location
	document.getElementById(divName).style.top  = y+'px';
	document.getElementById(divName).style.left = x+'px';

	if ((x+interval <= dest_x) || (y+interval <= dest_y)) {
		//Keep on calling this function every 100 microsecond 
		//	till the target location is reached
		window.setTimeout('moveDiv()',100);
	}
	
}

function moveRDiv() {
	//Keep on moving the Div till the target is achieved
	if(x>xOrg) x = x - interval; 
	if(y>yOrg) y = y - interval;
	
	//Move the Div to the new location
	document.getElementById(divName).style.top  = y+'px';
	document.getElementById(divName).style.left = x+'px';

	if ((x-interval >= xOrg) || (y-interval >= yOrg)) {
		//Keep on calling this function every 100 microsecond 
		//	till the target location is reached
		window.setTimeout('moveRDiv()',100);
	}
	
}

function toggleDiv() {
	if(divIn == 0)
	{
		//y  = yOrg;
		//x = xOrg;
		//document.getElementById(divName).style.display = "block";
		moveDiv();
    divIn = 1;
		
	}
	else
	{
    moveRDiv();
    divIn = 0;
		//document.getElementById(divName).style.display = "none";
		//document.getElementById(divName).style.top  = yOrg + 'px';
		//document.getElementById(divName).style.left = xOrg + 'px';
	}
}

	function WriteYear(){
   		var now  = new Date();
   		var year = now.getYear();
  		if(year < 2000) { year = year + 1900; }
		document.write(year);
	}

