
	function PrintThis(x){
		myWindow = window.open(x , 'oWin', 'left=20,top=20,scrollbars=yes,resizable=yes,width=800,height=800,status=yes');
	}
	function PrintThisCustom(x, y){
		if (x == 'article') {
		myWindow = window.open('/' + escape(y) + '/headerMode=basic&displaymode=printfriendly&custom=1', 'oWin', 'left=20,top=20,scrollbars=yes,resizable=yes,width=800,height=800,status=yes');}
		else {
		myWindow = window.open('/' + x + 'id=' + y + '/headerMode=basic&displaymode=printfriendly&custom=1' , 'oWin', 'left=20,top=20,scrollbars=yes,resizable=yes,width=800,height=800,status=yes');}
	}
	function EmailThisCustom(x, y){
		myWindow = window.open('/emailcontent/emailthiscontentid=1&headerMode=basic&displaymode=emailThis' + '&cId=' + escape(y) + '&cType=' + escape(x) + '&cURL=123' , 'oWin', 'left=20,top=20,scrollbars=yes,resizable=yes,width=780,height=700,status=yes');	
	}
	function PrintContent(){
		window.print();
	}
	function RateContent(x, y, z){
		myWindow = window.open('/contentrating/ContentId=' + x + '&ContentType=' + y + '&ContentTypeId=' + z + '&headerMode=basic&displaymode=rateThis', 'oWin', 'left=20,top=20,scrollbars=yes,resizable=yes,width=780,height=600,status=yes');
	}
	function EmailThis(x, y, z){
		myWindow = window.open('/emailcontent/emailthiscontentid=1&headerMode=basic&displaymode=emailThis' + '&cId=' + escape(y) + '&cType=' + escape(x) + '&cURL=' + escape(z) , 'oWin', 'left=20,top=20,scrollbars=yes,resizable=yes,width=780,height=700,status=yes');	
	}
	function CloseMe(){
		window.opener='x';
		window.close();	
	}
	function clearbox(x, y) {
		if (x.value == y){
		x.value = "";}
	}
	function send_email(x) {
		alert(Form(element).Count);
		<!--- validate(recipientName); --->
		if (x.value == "Please enter your comments here"){
		x.value = "";}			
	}
	function checkrequired(which){
	var pass=true
	if (document.images){
	for (i=0;i<which.length;i++){
		var tempobj=which.elements[i]
			if (!(tempobj.name == "comments")){
				if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
				pass=false
				break
				}
			}
		}
	}
	if (!pass){
	alert("One or more of the required elements are not completed. Please complete them, then submit again!")
	return false
	}
	else
	return true
	}	
	
	
	function submitenter(myfield,e)
        {
            var keycode;
            if (window.event) keycode = window.event.keyCode;
            else if (e) keycode = e.which;
            else return true;

            if (keycode == 13)
              {
                 myfield.form.submit();
                 return false;
              }
            else
            return true;
         }

	function changeFontSize(){
		
		// cookies are separated by semicolons
		
		var aCookie = document.cookie.split("; ");
		
		for (var i=0; i < aCookie.length; i++) {

			// a name/value pair (a crumb) is separated by an equal sign

			var aCrumb = aCookie[i].split("=");

			if (aCrumb[0] == "CAFontSize") {
				if (aCrumb[1] == "large") {
					document.styleSheets(nSwapSheet).href = "/css/main_small.css";
					document.cookie = "CAFontSize=small";
				} else {
					document.styleSheets(nSwapSheet).href = "/css/main_large.css";
					document.cookie = "CAFontSize=large";
				}

				return null;

			}
			
		}

		document.styleSheets(nSwapSheet).href = "/css/main_large.css";
		document.cookie = "CAFontSize=large";
		
	}
     