﻿// JScript File
function ChangePicture(sBigImageID, sImgUrl, shdnFieldID)
{
	var img = document.getElementById(sBigImageID);
	img.src = sImgUrl;
	var hdn = document.getElementById(shdnFieldID);
	hdn.value = sImgUrl;
}

function ChangePicture(sBigImageID, sImgUrl, shdnFieldID, iHeight, iWidth)
{
	var img = document.getElementById(sBigImageID);
	img.src = sImgUrl;
	img.height = iHeight;
	img.width = iWidth;
	var hdn = document.getElementById(shdnFieldID);
	hdn.value = sImgUrl;
}

function ChangePicture(sImgUrl, shdnFieldID)
{
	var hdn = document.getElementById(shdnFieldID);
	hdn.value = sImgUrl;
}

function popup(url, wname, wid, hei, lft, tp, hasScroll){		
	param = "toolbar=no,menubar=yes,scrollbars="+hasScroll+",resizable=yes,status=yes,location=no";
	
	var newWindow;
	
	if ( document.layers ){
		newWindow = window.open(url, wname, param + ',height='+hei+',width='+wid+',screenX='+lft+',screenY='+tp);
	}else{
		newWindow = window.open(url, wname, param + ',height='+hei+',width='+wid+',left='+lft+',top='+tp);
	}
	
	newWindow.focus();
}

function popupEmail(sURL) {	
	popup(sURL, 'Email', 480, 520, 50, 50, "yes");
}

function popupExternalLink(sURL) {	
	popup(sURL, 'External', 600, 400, 50, 50, "yes");
}

function clearImagesBorder()
{
	if (document.images)
	{
		for (i=0; i<document.images.length; i++)
		{
			document.images.item(i).style.borderColor="white";
		}
	}
}

