﻿// JScript File
function Open(address, windowname, windowvariables)
{
	window.open(address, windowname, windowvariables);
}
function OpenURL(address)
{
	Open(address, "NewWindow", "top=50,left=50,height=600,width=900,scrollbars=1,resizable=1,toolbar=1,menubar=1,location=1");
}
function Hide(ControlID)
{
	FindControl(ControlID).style.display = 'none';
}
function Show(ControlID)
{
	FindControl(ControlID).style.display = 'block';
}
function FindControl(ControlID)
{
	if (document.getElementById("ctl00_ContentPlaceHolder1_" + ControlID) != null)
		return document.getElementById("ctl00_ContentPlaceHolder1_" + ControlID);
	if (document.getElementById(ControlID) != null)
		return document.getElementById(ControlID);
	if (document.getElementById("_ctl0_ContentPlaceHolder1_" + ControlID) != null)
		return document.getElementById("_ctl0_ContentPlaceHolder1_" + ControlID);
	return document.getElementById("ctl00_" + ControlID);
}
function AddDot()
{
	document.getElementById("UploadingFile").innerText = document.getElementById("UploadingFile").innerText + ".";
	setTimeout("AddDot()",1000);
}

var timer_id;

function scroll_iframe(frm,inc,dir) {
	if (timer_id) clearTimeout(timer_id);
	if (document.getElementById('MyIframe')) {
		if (dir == "v")
			document.getElementById('MyIframe').scroll(0, inc);
		else
			document.getElementById('MyIframe').scroll(inc, 0);
		timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20);
	}
}

function stopScroll() { 
	if (timer_id) clearTimeout(timer_id); 
}