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;
	}
}

//--¤å¥ó¤U¸ü
function GetDOC(pid) {
    var oName = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_report_usernameTextBox');
    var oDept = document.getElementById('ctl00_ContentPlaceHolder1_FormView1_report_deptTextBox');

    var qlink = "StartDownLoad.aspx?q=" + pid;
    //var ret = window.showModalDialog(qlink, null, "dialogWidth:800px;dialogHeight:600px;help:no;status:no'");

    popWin(qlink, "popupDOC", 760, 620, 0, 0, 1);
}   
