function domap(str){
	if(document.all){
	parent.document.getElementById('map_info').innerHTML = Locations[str];
    }else{
    parent.document.getElementById('map_info').innerHTML = Locations[str];
    }
	parent.document.getElementById('MapInstructionDetails').className="hidden";
	parent.turnmapon();
}
function scrolmap(){
	myTimer = setTimeout("setloc()", 1000);
}
function scrolNewmap(){
	myauxTimer = setTimeout("setNewloc()", 1000);
}
function setloc(){
	scrollLP=150
	scrollPos=150
	window.frames["map"].scrollTo(scrollLP,scrollPos)
	clearTimeout(myTimer);
}
function setNewloc(){
	scrollLP=200
	scrollPos=150
	window.frames["map"].scrollTo(scrollLP,scrollPos)
	clearTimeout(myauxTimer);
}
function scrollbars() {
	if(document.all){
	var scrollset = window.frames["map"].document.body.scroll
	}else{
    var scrollset = document.getElementById('locality').scrolling
	}
	if (scrollset=="no"){
		enableScrolling()
		
	}else{
		disableScrolling()
	}
}
function enableScrolling(){
	if(document.all){
	window.frames["map"].document.body.scroll="yes";
	}else{
	document.getElementById('locality').scrolling="yes";
	window.frames["map"].scrollTo(scrollLP,scrollPos)
}
}
function disableScrolling(){
  if(document.all){
   window.frames["map"].document.body.scroll="no";
	}else{
	document.getElementById('locality').scrolling="no";
	window.frames["map"].scrollTo(scrollLP,scrollPos)
}
}
function showmap(){
	var content = window.frames["map"].location
	MM_openBrWindow(content,'','width=500,height=500')
}
function centermap(){
	myTimer = setTimeout("setloc()", 250);
}
function resetmap(){
	document.getElementById('locality').src="Map.php"
	parent.document.getElementById('MapInstructionDetails').className="bodyTextSm";
	mw.className="hidden";
}
function turnmapon(){
	mw = parent.document.getElementById('TVL')//.visible="visible";
	if(mw){
		mw.className="";
	}
}
scrollPos = 0
speed=1
scrollMe=""
scrollLP = 0
scrollRP = 0
function scrollDown() {
clearTimeout(scrollMe)
if(scrollLP){
	curtp=scrollLP
}else{
	curtp=0
}
scrollPos +=speed
window.frames["map"].scrollTo(curtp,scrollPos)
scrollMe=setTimeout("scrollDown()",50)

if(scrollPos>window.frames["map"].document.body.scrollHeight - (parseInt(document.getElementById("locality").style.height)-10)){
scrollPos=window.frames["map"].document.body.scrollHeight - (parseInt(document.getElementById("locality").style.height)-10) 
clearTimeout(scrollMe)
}
}
function scrolltoleft() {
clearTimeout(scrollMe)
if(scrollPos){
	curlp=scrollPos
}else{
	curlp=0
}
scrollLP +=speed
window.frames["map"].scrollTo(scrollLP,curlp)
scrollMe=setTimeout("scrolltoleft()",50)

if(scrollLP>window.frames["map"].document.body.scrollWidth - (parseInt(document.getElementById("locality").style.width)-10)){
scrollLP=window.frames["map"].document.body.scrollWidth - (parseInt(document.getElementById("locality").style.width)-10) 
clearTimeout(scrollMe)
}
}

function scrollUp() {
clearTimeout(scrollMe)
if(scrollLP){
	curtp=scrollLP
}else{
	curtp=0
}
scrollPos -=speed
window.frames["map"].scrollTo(curtp,scrollPos)
scrollMe=setTimeout("scrollUp()",50)

if(scrollPos<speed){
scrollPos=0
clearTimeout(scrollMe)
}
}
function scrolltoright() {
clearTimeout(scrollMe)
if(scrollPos){
	currp=scrollPos
}else{
	currp=0
}
scrollLP -=speed
window.frames["map"].scrollTo(scrollLP,currp)
scrollMe=setTimeout("scrolltoright()",50)

if(scrollLP<speed){
scrollLP=0
clearTimeout(scrollMe)
}
}

function stopMe(){
clearTimeout(scrollMe)
}


