//Pop Up Window  :: Java Script Function
function CreateWindow(url, windowName, theWidth, theHeight)
{
    if (windowName=="" || windowName=="_blank") {
        windowName = new String(Math.round(Math.random() * 100000));
    }
   	newwindow = window.open(url, windowName,'width=' + theWidth + ', height=' + theHeight + ', resizable = 1, scrollbars=1, top=100, left=250');
	if (window.focus) {newwindow.focus()}
}
function CreateWindow_Basic(url, windowName, theWidth, theHeight)
{
    if (windowName=="" || windowName=="_blank") {
        windowName = new String(Math.round(Math.random() * 100000));
    }
	newwindow = window.open(url, windowName,'width=' + theWidth + ',height=' + theHeight + ',resizable=0,scrollbars=0,menubar=0,status=0,directories=0,toolbar=0,location=0');
	if (window.focus) {newwindow.focus()}
}

function AddFavorite(sType, nID, sSubscriberID, sReturnURL) {
	if (sSubscriberID=="") {
		if (window.confirm("To use this feature, please Login or join My High Calling.") == true) {
			window.location = "/MyHighCalling/Login.asp?Type="+sType+"&ID=" + nID + "&ReturnURL=" + escape(sReturnURL);
		}
	} else {
		if (window.confirm("Are you sure you want to add to your favorites?") == true) {		
			window.location = "/MyHighCalling/AddFavorite.asp?Type="+sType+"&ID=" + nID + "&SubscriberID=" + sSubscriberID + "&ReturnURL=" + escape(sReturnURL);
		}
	}
}

function DeleteFavorite(sType, nID, sSubscriberID, sReturnURL) {
	if (window.confirm("Are you sure you want to delete this resource from your favorites?") == true) {
		window.location = "/MyHighCalling/DeleteFavorite.asp?Type="+sType+"&ID=" + nID + "&SubscriberID=" + sSubscriberID + "&ReturnURL=" + escape(sReturnURL);
	}
}

function LeaveCommentOrTag(sReturnURL) {
	if (window.confirm("To use this feature, please Login or join My High Calling.") == true) {
		window.location = "/MyHighCalling/Login.asp?ReturnURL=" + escape(sReturnURL);
	}
}
function clearEmail() {
	if (document.NewsletterSignup.Email.value == "email@address") {
		document.NewsletterSignup.Email.value = "";
	}
} 
