function TipAFriend(){
	tipWindow = window.open('../TipAFriend/PopUpForm.asp','TipAFriendWindow','Height=400,Width=320, location=no, status=no,menubar=no,resizable=no, toolbar=no');
	tipWindow.focus();
}

function ChangeIcon( imageObjectId, strNewFile )
{
	var tmpImage = new Image();
	var tmpImgArray = new Array;
	tmpImgArray[0] = tmpImage
	tmpImgArray[0].src = strNewFile
	document.images[ imageObjectId ].src = tmpImgArray[0].src;
}

function submitForm( formId )
{
	formId.submit();
}

function OpenPrintTemplate( strLink, isItem )
{
	//direct print window.print()
	//open printtemplate in popup window
	window.open( '../PrintTemplates/PrintTemplate.asp?IsItem=' + isItem + '&Link=' + escape( strLink ), 'PrintWindow', 'Height=600,Width=420, toolbar=no, location=no, status=no, scrollbars=yes') 
}

function validateEmailAddress( inputField ){
	var result  = false
	var theString = inputField.value
	var atIndex = theString.indexOf("@")
	if (atIndex > 0)
	{
	  var pIndex = theString.indexOf(".",atIndex);
	  if ((pIndex > atIndex+1) && (theString.length > pIndex+1))
		result = true;
	}
	return result;
}


function validateShortTextString( inputField ){
	if ( (inputField.value.length > 0 ) && (inputField.value.length < 256) )
		return true;
	else
		return false;
}

function openHelpWindow( strLink ){
	window.open( strLink, 'HelpWindow', 'status=no, location=no, width=640, height=600, scrollbars' )
}
