         function PopupWindow(location, window_name, toolbar, locationbar, directoriesbar, statusbar, menubar, scrollbars, resizable, iwidth, iheight,xOffset,yOffset)
		{
			var options = ''
			if (toolbar == 'True')
				{
					var options = 'toolbar=yes'
				}
			else
				{
					options = 'toolbar=no'
				}
			if (locationbar == 'True')
				{
					options = options+', location=yes'
				}
			else
				{
					options = options+', location=no'
				}
			if (directoriesbar == 'True')
				{
					options = options+', directories=yes'
				}
			else
				{
					options = options+', directories=no'
				}
			if (statusbar == 'True')
				{
					options = options+', status=yes'
				}
			else
				{
					options = options+', status=no'
				}
			if (menubar == 'True')
				{
					options = options+', menubar=yes'
				}
			else
				{
					options = options+', menubar=no'
				}
			if (scrollbars == 'True')
				{
					options = options+', scrollbars=yes'
				}
			else
				{
					options = options+', scrollbars=no'
				}
			if (resizable == 'True')
				{
					options = options+', resizable=yes'
				}
			else
				{
					var options = options+', resizable=no'
				}
			popupWin = window.open(location, window_name, options+', width='+iwidth+', height='+iheight+', screenX='+xOffset+', screenY='+yOffset+', top='+yOffset+', left='+xOffset+'');
			popupWin.focus();
		}
		function GetCharCount(e,maxlength,clientid)
		{
			varTheText = e.value
			clientid.innerText = parseInt(maxlength-(varTheText.length)) + " Chars Left"
		}

function limitText(limitField, limitNum) 
			{
				if(limitField.value.length >limitNum )
				{
					limitField.value = limitField.value.substring(0, limitNum);
					return false;
				}
				else
				{ 
					return true;
				} 

			}	

		function preventPaste(limitField,limitNum)
		{

		var CanInsertLength; 
		var sData = window.clipboardData.getData("Text");
		var newData ; 

		CanInsertLength = limitNum - limitField.value.length ; 

		if(CanInsertLength <= 0)
		{
		return false;
		}
		else
		{
		newData = sData.substr(0,CanInsertLength);
		window.clipboardData.setData("Text",newData);
		return true; 
		} 

		}
