function stopError(sMsg, sUrl, sLine) 
{
	var sErrMsg;
	sErrMsg = "An Error occurred: \n";
	sErrMsg += "Error:  " + sMsg + "\n";
	sErrMsg += "Line:   " + sLine + "\n";
	sErrMsg += "Url:    " + sUrl + "\n";
	//window.alert(sErrMsg);
	return true;

}

function pop(product_code,prod_name)
{
	window.name='main';
	leftandtop='left='+((window.screen.availWidth-50)/2)+',top='+((window.screen.availHeight-50)/2);
	heightandwidth='width=50,height=50';
	popupwin=window.open('/HanoverCommon/Availability/ProductAvailability.aspx?product_code=' + product_code + '&div=<%=Application("hdi_div_no")%>&pname=' + prod_name  ,'popupwin'+product_code,heightandwidth+',scrollbars=no,status=no,toolbars=no,' + leftandtop+',resizable=no,menubar=no');
	popupwin.focus();
}

function ShowCard()
{
	
	window.name='main';
	leftandtop='left='+((window.screen.availWidth-50)/2)+',top='+((window.screen.availHeight-50)/2);
	popupwin=window.open('<%=assetsite%>/giftcard/cardback.gif' ,'popupwin', 'width=450,height=300,scrollbars=no,status=no,toolbars=no,resizable=no,' + leftandtop); 
	//popupwin.focus();
}	

function strip(string, symbol) {
	var newstring = "";

		for (var i = 0; i < string.length; i++) {
			if (string.charAt(i) != symbol)
				newstring += string.charAt(i);
	}
	return newstring;
}

function openNew(sURL){
	newWindow=open(sURL,"newWin2","scrollbars=yes,toolbar=no,directories=no,menu bar=no,resizable=yes,status=yes,width=300,height=250");
}

function GCCharsLeft(){
	document.email1.count_display.value=1000-document.email1.comments.value.length;
}

function scrollToView(sElementId) {
	var myBag = document.getElementById(sElementId);
	if (myBag != null) {
		myBag.scrollIntoView(true);
	}
}