var timer;
function scrollFrame(frame,interval,move) {
	if (timer) clearTimeout(timer);
		if (window.frames[frame]) {
		if (move == "m") window.frames[frame].scrollBy(0, interval);
		else window.frames[frame].scrollBy(interval, 0);
	timer = setTimeout("scrollFrame('" + frame + "'," + interval + ",'" + move + "')", 20);
		}
}

function stopScroll() { if (timer) clearTimeout(timer); }

function submitToPopup(formref) //Open New window.
{
    newwin = window.open('about:blank','newWindow','height=650,width=650,left=250,top=5,titlebar=no');
    formref.submit();
    newwin.focus();
}

function enableFrameURL() {
	if(window.location.href != 'http://www.scan-top.com/index.html?/home.php' && window.location.href.substr(7,16) == 'www.scan-top.com') {
		loadSource();		
	}else{
		return;
	}	
}

function loadSource() 
{ //use this function to load pages into frames....
  if (location.search!="")
  {
    src=unescape(location.search.substring(1));
    top.frames['mainframe'].location.href=src;
  }
}