function PopupImage(imgPath)
{

    imgPath = "ImageViewer.aspx?ImagePath=" +  imgPath;

	popWin(imgPath, "popupImage", 700, 520, 1, 1,1); 

}

function PopupMap(imgPath)
{
    imgPath = "ImageViewer.aspx?ImagePath=" +  imgPath;
    
	popWin(imgPath, "popupImage", 840, 650, 0, 0,0);

}

function PopMap(branch) {
    imgPath = "../showmap.aspx?branch=" + branch;

    popWin(imgPath, "popupImage", 760, 620, 0, 0, 0);

}


function popWin(mypage, myname,  w, h, scroll, status, resize) {
	//var scroll=1;
	var winl = (screen.availWidth - w) / 2;
	var wint = (screen.availHeight - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize+',status=' + status
	win = window.open (mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function ShowUserProfile(ID)
{
    var szUrl = "UserProfile.aspx?ID=" + ID;
    popWin(szUrl, "Profile", 600, 600, 0, 1, 0);
}

function ShowCommendedForm(ID)
{

	popWin("RecommendedForm.aspx?ID=" + ID, "CommendedForm", 780, 620, 1, 0, 0);
}

function ShowAlbum()
{

	popWin("../Albums/index.htm", "Album", 830, 620, 0, 0, 0);
}


function ProductPrint(ID)
{
    popWin("ProductPrint.aspx?ID=" + ID, "CommendedForm", 950, 620, 1, 0, 1);
}


function SetProgressPos()
{
	var oDivProgress = document.getElementById("divProgress");
	
	if (oDivProgress)
	{
		oDivProgress.style.top = document.body.scrollTop ;
		oDivProgress.style.left = document.body.scrollWidth - document.body.scrollLeft - oDivProgress.offsetWidth;
	}
}