function formCheck(descr)
{
	if (document.subscribe.EMAIL_ADDRESS.value == "")
	{
		alert ("Please specify your Email address");
		document.subscribe.EMAIL_ADDRESS.focus();
		return false;
	}
	else
	{
		if (!validEmail(document.subscribe.EMAIL_ADDRESS.value))
		{
			alert ("Invalid Email address. Please reenter");
			document.subscribe.EMAIL_ADDRESS.focus();
			return false;
		}
	}


	if (ObjectExists(document.subscribe,"RECEIVE_YES_NO"))
	{
		if(document.subscribe.RECEIVE_YES_NO[0].checked == false && document.subscribe.RECEIVE_YES_NO[1].checked == false)
		{
			alert ("Please specify whether you wish to receive " + descr + "." );
        		document.subscribe.RECEIVE_YES_NO[0].focus();
			return false;
		}
	}


	if (document.subscribe.FNAME.value == "")
	{
		alert ("Please specify your First Name.");
        	document.subscribe.FNAME.focus();
		return false;
	}
	if (document.subscribe.LNAME.value == "")
	{
		alert ("Please specify your Larst Name.");
        	document.subscribe.LNAME.focus();
		return false;
	}
	if (document.subscribe.TITLE.value == "")
	{
		alert ("Please specify your Job Title.");
        	document.subscribe.TITLE.focus();
		return false;
	}
        
	if (ObjectExists(document.subscribe,"JOB_TITLE"))
	{
		if(!CheckDropdown(document.subscribe.JOB_TITLE))
		{
			alert ("Please select your Job Function.");
        		document.subscribe.JOB_TITLE.focus();
			return false;
		}

		if (document.subscribe.JOB_TITLE[document.subscribe.JOB_TITLE.selectedIndex].value =="015")
		{
			if(document.subscribe.JOB_TITLE_DESC.value == "")
			{
				alert ("Please specify your other Corporate Management Job Title.");
        			document.subscribe.JOB_TITLE_DESC.focus();
				return false;
			}
		}
	}

	if (document.subscribe.COMPANY.value == "")
	{
		alert ("Please specify your Company.");
        	document.subscribe.COMPANY.focus();
		return false;
	}
	if (document.subscribe.ADDRESS2.value == "")
	{
		alert ("Please specify your Street address.");
        	document.subscribe.ADDRESS2.focus();
		return false;
	}
	if (document.subscribe.CITY.value == "")
	{
		alert ("Please specify your City.");
        	document.subscribe.CITY.focus();
		return false;
	}

	if (document.subscribe.STATE.selectedIndex == 0)
	{
		alert ("Please specify your State/Province or select 'Outside US/Canada'.");
		document.subscribe.STATE.focus();
		return false;
	}
	// validate Canadian state/postal code combination
	if (!ValidCanPostal(document.subscribe.STATE[document.subscribe.STATE.selectedIndex].value,document.subscribe.ZIPCODE.value))
	{
		alert ("Invalid Canadian province/postal code combination.");
       		document.subscribe.STATE.focus();
		return false;
	}
	if (document.subscribe.STATE[document.subscribe.STATE.selectedIndex].value == "53")
	{
		if (document.subscribe.COUNTRY.value == "")
		{
			alert ("Please select your Country.");
	        	document.subscribe.COUNTRY.focus();
			return false;
		}
	}
	else
	{
		if (document.subscribe.ZIPCODE.value.length < 5)
		{
			alert ("Please specify your Zip/Postal Code.");
        		document.subscribe.ZIPCODE.focus();
			return false;
		}
	}

	if(document.subscribe.PHONE.value == "")
	{
		alert ("Please specify your Business Phone.");
        	document.subscribe.PHONE.focus();
		return false;
	}

	if (ObjectExists(document.subscribe,"INDUSTRY"))
	{
		if(!CheckDropdown(document.subscribe.INDUSTRY))
		{
			alert ("Please select your Primary Business Industry.");
        		document.subscribe.INDUSTRY.focus();
			return false;
		}

		if (document.subscribe.INDUSTRY[document.subscribe.INDUSTRY.selectedIndex].value =="27")
		{
			if(document.subscribe.INDUSTRY_DESC.value == "")
			{
				alert ("Please specify your other Computer Related Primary Business Industry.");
        			document.subscribe.INDUSTRY_DESC.focus();
				return false;
			}
		}
	}
if (ObjectExists(document.subscribe,"BUSINESS"))
	{
		if(!CheckDropdown(document.subscribe.BUSINESS))
		{
			alert ("Please select your Primary Business Industry.");
        		document.subscribe.BUSINESS.focus();
			return false;
		}

		if (document.subscribe.BUSINESS[document.subscribe.BUSINESS.selectedIndex].value =="27")
		{
			if(document.subscribe.BUSINESS_DESC.value == "")
			{
				alert ("Please specify your other Computer Related Primary Business Industry.");
        			document.subscribe.BUSINESS_DESC.focus();
				return false;
			}
		}
	}
if (ObjectExists(document.subscribe,"EMPLOYEES_ENTR_ORG"))
	{
	if (!CheckDropdown(document.subscribe.EMPLOYEES_ENTR_ORG))
		{
			alert ("Please select your Company Size.");
        		document.subscribe.EMPLOYEES_ENTR_ORG.focus();
			return false;
		}
	}
if (ObjectExists(document.subscribe,"EMPLOYEES"))
	{
        	if (!CheckDropdown(document.subscribe.EMPLOYEES))
		{
			alert ("Please select your Company Size.");
        		document.subscribe.EMPLOYEES.focus();
			return false;
		}
        }

	if (!CheckboxChecked("IT_DECISION"))
	{
		alert ("Please check your Role in IT decision-making process.");
		myFocus=document.getElementById("IT_DECISION");
		myFocus.scrollIntoView(true);
		return false;
	}

// annual budget	
	if (document.getElementById("ORG_APP_DESIGN"))
	{
		if (!CheckedRadioValue(document.subscribe.ORG_APP_DESIGN))
		{
			alert ("What is your company's annual budget for Application Design and Development Tools.");
			myFocus=document.getElementById("ORG_APP_DESIGN");
			myFocus.scrollIntoView(true);
			return false;
		}
	}
	
	if (document.getElementById("ORG_CLOUD_COMPUTING"))
	{
		if (!CheckedRadioValue(document.subscribe.ORG_CLOUD_COMPUTING))
		{
			alert ("What is your company's annual budget for Cloud Computing Services.");
			myFocus=document.getElementById("ORG_CLOUD_COMPUTING");
			myFocus.scrollIntoView(true);
			return false;
		}
	}
	
	if (document.getElementById("ORG_CUSTOMER_COMM"))
	{
		if (!CheckedRadioValue(document.subscribe.ORG_CUSTOMER_COMM))
		{
			alert ("What is your company's annual budget for Customer Communications/Relationship Management.");
			myFocus=document.getElementById("ORG_CUSTOMER_COMM");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}
	
	if (document.getElementById("ORG_STORAGE_DATA"))//bls
	{
		if (!CheckedRadioValue(document.subscribe.ORG_STORAGE_DATA))
		{
			alert ("What is your company's annual budget for Databases and Database Management Tools.");
			myFocus=document.getElementById("ORG_STORAGE_DATA");
			myFocus.scrollIntoView(true);
			return false;
		}
	}	
	if (document.getElementById("ORG_STORAGE"))//ist
	{
		if (!CheckedRadioValue(document.subscribe.ORG_STORAGE))
		{
			alert ("What is your company's annual budget for Databases and Database Management Tools.");
			myFocus=document.getElementById("ORG_STORAGE");
			myFocus.scrollIntoView(true);
			return false;
		}
	}		
	if (document.getElementById("ORG_DESKTOP_NOTEBOOK"))
	{
		if (!CheckedRadioValue(document.subscribe.ORG_DESKTOP_NOTEBOOK))
		{
			alert ("What is your company's annual budget for Desktop & Notebook Computers.");
			myFocus=document.getElementById("ORG_DESKTOP_NOTEBOOK");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}
	if (document.getElementById("ORG_INT_EXT"))//ist
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_INT_EXT))
		{
			alert ("What is your company's annual budget for Desktop Software.");
			myFocus=document.getElementById("ORG_INT_EXT");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_INET_SOFTWARE"))//bsl
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_INET_SOFTWARE))
		{
			alert ("What is your company's annual budget for Desktop Software.");
			myFocus=document.getElementById("ORG_INET_SOFTWARE");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("ORG_INET"))//ewk
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_INET))
		{
			alert ("What is your company's annual budget for Desktop Software.");
			myFocus=document.getElementById("ORG_INET");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("ORG_DISASTER_RECOVERY"))
	{		
			
		if (!CheckedRadioValue(document.subscribe.ORG_DISASTER_RECOVERY))
		{
			alert ("What is your company's annual budget for Disaster Recovery/Back-up Systems.");
			myFocus=document.getElementById("ORG_DISASTER_RECOVERY");
			myFocus.scrollIntoView(true);
			return false;
		}		
	}

	if (document.getElementById("ORG_COMP_SOFT"))//ist
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_COMP_SOFT))
		{
			alert ("What is your company's annual budget for End User Application Software.");
			myFocus=document.getElementById("ORG_COMP_SOFT");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_APP_SOFTWARE"))//bsl
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_APP_SOFTWARE))
		{
			alert ("What is your company's annual budget for End User Application Software.");
			myFocus=document.getElementById("ORG_APP_SOFTWARE");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("ORG_APP_SOFT"))//ewk
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_APP_SOFT))
		{
			alert ("What is your company's annual budget for End User Application Software.");
			myFocus=document.getElementById("ORG_APP_SOFT");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}			
	if (document.getElementById("ORG_ENTERPRISE_APPS"))
	{				
		if (!CheckedRadioValue(document.subscribe.ORG_ENTERPRISE_APPS))
		{
			alert ("What is your company's annual budget for Enterprise Applications.");
			myFocus=document.getElementById("ORG_ENTERPRISE_APPS");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}
	if (document.getElementById("ORG_CONSULT_STAFF"))
	{				
		if (!CheckedRadioValue(document.subscribe.ORG_CONSULT_STAFF))
		{
			alert ("What is your company's annual budget for IT Consulting Services.");
			myFocus=document.getElementById("ORG_CONSULT_STAFF");
			myFocus.scrollIntoView(true);
			return false;
		}		
	}
	if (document.getElementById("ORG_SECURITY"))
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_SECURITY))
		{
			alert ("What is your company's annual budget for IT Security.");
			myFocus=document.getElementById("ORG_SECURITY");
			myFocus.scrollIntoView(true);
			return false;
		}		
	}
	if (document.getElementById("ORG_PERIPHERALS"))
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_PERIPHERALS))
		{
			alert ("What is your company's annual budget for Mobile Devices.");
			myFocus=document.getElementById("ORG_PERIPHERALS");
			myFocus.scrollIntoView(true);
			return false;
		}			
	}
	if (document.getElementById("ORG_NET_TEL"))//ist
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_NET_TEL))
		{
			alert ("What is your company's annual budget for Network Hardware.");
			myFocus=document.getElementById("ORG_NET_TEL");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}
	if (document.getElementById("ORG_NETWORK"))//bsl
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_NETWORK))
		{
			alert ("What is your company's annual budget for Network Hardware.");
			myFocus=document.getElementById("ORG_NETWORK");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_COMP_SYS"))//ist
	{					
		if (!CheckedRadioValue(document.subscribe.ORG_COMP_SYS))
		{
			alert ("What is your company's annual budget for Server and Storage Hardware.");
			myFocus=document.getElementById("ORG_COMP_SYS");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_HARDWARE"))//bsl
	{					
		if (!CheckedRadioValue(document.subscribe.ORG_HARDWARE))
		{
			alert ("What is your company's annual budget for Server and Storage Hardware.");
			myFocus=document.getElementById("ORG_HARDWARE");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("ORG_TELECOMMUNICATION"))
	{			
		if (!CheckedRadioValue(document.subscribe.ORG_TELECOMMUNICATION))
		{
			alert ("What is your company's annual budget for Telecommunications.");
			myFocus=document.getElementById("ORG_TELECOMMUNICATION");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_TRAINING"))
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_TRAINING))
		{
			alert ("What is your company's annual budget for Training.");
			myFocus=document.getElementById("ORG_TRAINING");
			myFocus.scrollIntoView(true);
			return false;
		}		
	}	
	if (document.getElementById("ORG_VIRTUALIZATION"))
	{	
		if (!CheckedRadioValue(document.subscribe.ORG_VIRTUALIZATION))
		{
			alert ("What is your company's annual budget for Virtualization.");
			myFocus=document.getElementById("ORG_VIRTUALIZATION");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("BUDGET"))
	{	

		if (!CheckDropdown(document.subscribe.BUDGET))
		{
			alert ("What percentage of the annual budget are you personally involved with.");
			myFocus=document.getElementById("BUDGET");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("BUDGET_INVOLVED"))
	{	

		if (!CheckDropdown(document.subscribe.BUDGET_INVOLVED))
		{
			alert ("What percentage of the annual budget are you personally involved with.");
			myFocus=document.getElementById("BUDGET_INVOLVED");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}			
// end 		
	
	if (!CheckedRadioValue(document.subscribe.PURCHASE_IT))
	{
		alert ("Please specify whether you authorize, recommend, evaluate and/or specify IT solutions, products and/or services for your organization.");
		myFocus=document.getElementById("PURCHASE_IT");
		myFocus.scrollIntoView(true);
		return false;
	}
	if (!CheckedRadioValue(document.subscribe.RESELL_IT))
	{
		alert ("Please specify whether you resell IT products and services.");
		myFocus=document.getElementById("RESELL_IT");
		myFocus.scrollIntoView(true);
		return false;
	}

	if (!CheckDropdown(document.subscribe.PERSONAL_ID))
	{
		alert ("Please specify your personal identifier.");
        	document.subscribe.PERSONAL_ID.focus();
		return false;
	}
	if (ObjectExists(document.subscribe,"REQUESTED_VERSION"))
	{
		if (!CheckedRadioValue(document.subscribe.REQUESTED_VERSION))
		{
			alert ("Please specify In which format in would you like to receive " + descr + ".");
			myFocus=document.getElementById("REQUESTED_VERSION");
			myFocus.scrollIntoView(true);
			return false;
		}
	}
	return true;
}

var yesno;
function formCheckMulti()
{
	if (document.subscribe.EMAIL_ADDRESS.value == "")
	{
		alert ("Please specify your Email address");
		document.subscribe.EMAIL_ADDRESS.focus();
		return false;
	}
	else
	{
		if (!validEmail(document.subscribe.EMAIL_ADDRESS.value))
		{
			alert ("Invalid Email address. Please reenter");
			document.subscribe.EMAIL_ADDRESS.focus();
			return false;
		}
	}

	yesno = false;
//alert('1: ' + yesno);	
	if (ObjectExists(document.subscribe,"BSL_RECEIVE_YES_NO"))
	{

		if(document.subscribe.BSL_RECEIVE_YES_NO[0].checked == false && document.subscribe.BSL_RECEIVE_YES_NO[1].checked == false)
	//if(document.subscribe.BSL_RECEIVE_YES_NO[1].checked == false )
		{
			alert ("Please specify whether you wish to receive Baseline." );
        		document.subscribe.BSL_RECEIVE_YES_NO[0].focus();
			return false;
		}
		if (document.subscribe.BSL_RECEIVE_YES_NO[0].checked == true)
		{
			yesno=true;
		}
	}

	if (ObjectExists(document.subscribe,"IST_RECEIVE_YES_NO"))
	{
		if(document.subscribe.IST_RECEIVE_YES_NO[0].checked == false && document.subscribe.IST_RECEIVE_YES_NO[1].checked == false)
		{
			alert ("Please specify whether you wish to receive CIO Insight." );
        		document.subscribe.IST_RECEIVE_YES_NO[0].focus();
			return false;
		}
		if (document.subscribe.IST_RECEIVE_YES_NO[0].checked == true)
		{
			yesno=true;
		}
	}

	if (ObjectExists(document.subscribe,"EWK_RECEIVE_YES_NO"))
	{
		if(document.subscribe.EWK_RECEIVE_YES_NO[0].checked == false && document.subscribe.EWK_RECEIVE_YES_NO[1].checked == false)
		{
			alert ("Please specify whether you wish to receive eWEEK." );
        		document.subscribe.EWK_RECEIVE_YES_NO[0].focus();
			return false;
		}
		if (document.subscribe.EWK_RECEIVE_YES_NO[0].checked == true)
		{
			yesno=true;
		}
	}
//alert('uy: ' + yesno)	;
	if (yesno==false)
	{
		alert ("Please specify whether you wish to subscribe to any of these magazines.");
        document.subscribe.EMAIL_ADDRESS.focus();
		return false;
		
	}
// check all 'no' for ryn




// end	
	if (document.subscribe.FNAME.value == "")
	{
		alert ("Please specify your First Name.");
        	document.subscribe.FNAME.focus();
		return false;
	}
	if (document.subscribe.LNAME.value == "")
	{
		alert ("Please specify your Larst Name.");
        	document.subscribe.LNAME.focus();
		return false;
	}
	if (document.subscribe.TITLE.value == "")
	{
		alert ("Please specify your Job Title.");
        	document.subscribe.TITLE.focus();
		return false;
	}
        
	if (ObjectExists(document.subscribe,"JOB_TITLE"))
	{
		if(!CheckDropdown(document.subscribe.JOB_TITLE))
		{
			alert ("Please select your Job Function.");
        		document.subscribe.JOB_TITLE.focus();
			return false;
		}

		if (document.subscribe.JOB_TITLE[document.subscribe.JOB_TITLE.selectedIndex].value =="015")
		{
			if(document.subscribe.JOB_TITLE_DESC.value == "")
			{
				alert ("Please specify your other Corporate Management Job Title.");
        			document.subscribe.JOB_TITLE_DESC.focus();
				return false;
			}
		}
	}

	if (document.subscribe.COMPANY.value == "")
	{
		alert ("Please specify your Company.");
        	document.subscribe.COMPANY.focus();
		return false;
	}
	if (document.subscribe.ADDRESS2.value == "")
	{
		alert ("Please specify your Street address.");
        	document.subscribe.ADDRESS2.focus();
		return false;
	}
	if (document.subscribe.CITY.value == "")
	{
		alert ("Please specify your City.");
        	document.subscribe.CITY.focus();
		return false;
	}

	if (document.subscribe.STATE.selectedIndex == 0)
	{
		alert ("Please specify your State/Province or select 'Outside US/Canada'.");
		document.subscribe.STATE.focus();
		return false;
	}
	// validate Canadian state/postal code combination
	if (!ValidCanPostal(document.subscribe.STATE[document.subscribe.STATE.selectedIndex].value,document.subscribe.ZIPCODE.value))
	{
		alert ("Invalid Canadian province/postal code combination.");
       		document.subscribe.STATE.focus();
		return false;
	}
	if (document.subscribe.STATE[document.subscribe.STATE.selectedIndex].value == "53")
	{
		if (document.subscribe.COUNTRY.value == "")
		{
			alert ("Please select your Country.");
	        	document.subscribe.COUNTRY.focus();
			return false;
		}
	}
	else
	{
		if (document.subscribe.ZIPCODE.value.length < 5)
		{
			alert ("Please specify your Zip/Postal Code.");
        		document.subscribe.ZIPCODE.focus();
			return false;
		}
	}

	if(document.subscribe.PHONE.value == "")
	{
		alert ("Please specify your Business Phone.");
        	document.subscribe.PHONE.focus();
		return false;
	}

	if (ObjectExists(document.subscribe,"INDUSTRY"))
	{
		if(!CheckDropdown(document.subscribe.INDUSTRY))
		{
			alert ("Please select your Primary Business Industry.");
        		document.subscribe.INDUSTRY.focus();
			return false;
		}

		if (document.subscribe.INDUSTRY[document.subscribe.INDUSTRY.selectedIndex].value =="27")
		{
			if(document.subscribe.INDUSTRY_DESC.value == "")
			{
				alert ("Please specify your other Computer Related Primary Business Industry.");
        			document.subscribe.INDUSTRY_DESC.focus();
				return false;
			}
		}
	}
if (ObjectExists(document.subscribe,"BUSINESS"))
	{
		if(!CheckDropdown(document.subscribe.BUSINESS))
		{
			alert ("Please select your Primary Business Industry.");
        		document.subscribe.BUSINESS.focus();
			return false;
		}

		if (document.subscribe.BUSINESS[document.subscribe.BUSINESS.selectedIndex].value =="27")
		{
			if(document.subscribe.BUSINESS_DESC.value == "")
			{
				alert ("Please specify your other Computer Related Primary Business Industry.");
        			document.subscribe.BUSINESS_DESC.focus();
				return false;
			}
		}
	}
if (ObjectExists(document.subscribe,"EMPLOYEES_ENTR_ORG"))
	{
	if (!CheckDropdown(document.subscribe.EMPLOYEES_ENTR_ORG))
		{
			alert ("Please select your Company Size.");
        		document.subscribe.EMPLOYEES_ENTR_ORG.focus();
			return false;
		}
	}
if (ObjectExists(document.subscribe,"EMPLOYEES"))
	{
        	if (!CheckDropdown(document.subscribe.EMPLOYEES))
		{
			alert ("Please select your Company Size.");
        		document.subscribe.EMPLOYEES.focus();
			return false;
		}
        }

	if (!CheckboxChecked("IT_DECISION"))
	{
		alert ("Please check your Role in IT decision-making process.");
		myFocus=document.getElementById("IT_DECISION");
		myFocus.scrollIntoView(true);
		return false;
	}

// annual budget	
	if (document.getElementById("ORG_APP_DESIGN"))
	{
		if (!CheckedRadioValue(document.subscribe.ORG_APP_DESIGN))
		{
			alert ("What is your company's annual budget for Application Design and Development Tools.");
			myFocus=document.getElementById("ORG_APP_DESIGN");
			myFocus.scrollIntoView(true);
			return false;
		}
	}
	
	if (document.getElementById("ORG_CLOUD_COMPUTING"))
	{
		if (!CheckedRadioValue(document.subscribe.ORG_CLOUD_COMPUTING))
		{
			alert ("What is your company's annual budget for Cloud Computing Services.");
			myFocus=document.getElementById("ORG_CLOUD_COMPUTING");
			myFocus.scrollIntoView(true);
			return false;
		}
	}
	
	if (document.getElementById("ORG_CUSTOMER_COMM"))
	{
		if (!CheckedRadioValue(document.subscribe.ORG_CUSTOMER_COMM))
		{
			alert ("What is your company's annual budget for Customer Communications/Relationship Management.");
			myFocus=document.getElementById("ORG_CUSTOMER_COMM");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}
	
	if (document.getElementById("ORG_STORAGE_DATA"))//bls
	{
		if (!CheckedRadioValue(document.subscribe.ORG_STORAGE_DATA))
		{
			alert ("What is your company's annual budget for Databases and Database Management Tools.");
			myFocus=document.getElementById("ORG_STORAGE_DATA");
			myFocus.scrollIntoView(true);
			return false;
		}
	}	
	if (document.getElementById("ORG_STORAGE"))//ist
	{
		if (!CheckedRadioValue(document.subscribe.ORG_STORAGE))
		{
			alert ("What is your company's annual budget for Databases and Database Management Tools.");
			myFocus=document.getElementById("ORG_STORAGE");
			myFocus.scrollIntoView(true);
			return false;
		}
	}		
	if (document.getElementById("ORG_DESKTOP_NOTEBOOK"))
	{
		if (!CheckedRadioValue(document.subscribe.ORG_DESKTOP_NOTEBOOK))
		{
			alert ("What is your company's annual budget for Desktop & Notebook Computers.");
			myFocus=document.getElementById("ORG_DESKTOP_NOTEBOOK");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}
	if (document.getElementById("ORG_INT_EXT"))//ist
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_INT_EXT))
		{
			alert ("What is your company's annual budget for Desktop Software.");
			myFocus=document.getElementById("ORG_INT_EXT");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_INET_SOFTWARE"))//bsl
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_INET_SOFTWARE))
		{
			alert ("What is your company's annual budget for Desktop Software.");
			myFocus=document.getElementById("ORG_INET_SOFTWARE");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("ORG_INET"))//ewk
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_INET))
		{
			alert ("What is your company's annual budget for Desktop Software.");
			myFocus=document.getElementById("ORG_INET");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("ORG_DISASTER_RECOVERY"))
	{		
			
		if (!CheckedRadioValue(document.subscribe.ORG_DISASTER_RECOVERY))
		{
			alert ("What is your company's annual budget for Disaster Recovery/Back-up Systems.");
			myFocus=document.getElementById("ORG_DISASTER_RECOVERY");
			myFocus.scrollIntoView(true);
			return false;
		}		
	}

	if (document.getElementById("ORG_COMP_SOFT"))//ist
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_COMP_SOFT))
		{
			alert ("What is your company's annual budget for End User Application Software.");
			myFocus=document.getElementById("ORG_COMP_SOFT");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_APP_SOFTWARE"))//bsl
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_APP_SOFTWARE))
		{
			alert ("What is your company's annual budget for End User Application Software.");
			myFocus=document.getElementById("ORG_APP_SOFTWARE");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("ORG_APP_SOFT"))//ewk
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_APP_SOFT))
		{
			alert ("What is your company's annual budget for End User Application Software.");
			myFocus=document.getElementById("ORG_APP_SOFT");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}			
	if (document.getElementById("ORG_ENTERPRISE_APPS"))
	{				
		if (!CheckedRadioValue(document.subscribe.ORG_ENTERPRISE_APPS))
		{
			alert ("What is your company's annual budget for Enterprise Applications.");
			myFocus=document.getElementById("ORG_ENTERPRISE_APPS");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}
	if (document.getElementById("ORG_CONSULT_STAFF"))
	{				
		if (!CheckedRadioValue(document.subscribe.ORG_CONSULT_STAFF))
		{
			alert ("What is your company's annual budget for IT Consulting Services.");
			myFocus=document.getElementById("ORG_CONSULT_STAFF");
			myFocus.scrollIntoView(true);
			return false;
		}		
	}
	if (document.getElementById("ORG_SECURITY"))
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_SECURITY))
		{
			alert ("What is your company's annual budget for IT Security.");
			myFocus=document.getElementById("ORG_SECURITY");
			myFocus.scrollIntoView(true);
			return false;
		}		
	}
	if (document.getElementById("ORG_PERIPHERALS"))
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_PERIPHERALS))
		{
			alert ("What is your company's annual budget for Mobile Devices.");
			myFocus=document.getElementById("ORG_PERIPHERALS");
			myFocus.scrollIntoView(true);
			return false;
		}			
	}
	if (document.getElementById("ORG_NET_TEL"))//ist
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_NET_TEL))
		{
			alert ("What is your company's annual budget for Network Hardware.");
			myFocus=document.getElementById("ORG_NET_TEL");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}
	if (document.getElementById("ORG_NETWORK"))//bsl
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_NETWORK))
		{
			alert ("What is your company's annual budget for Network Hardware.");
			myFocus=document.getElementById("ORG_NETWORK");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_COMP_SYS"))//ist
	{					
		if (!CheckedRadioValue(document.subscribe.ORG_COMP_SYS))
		{
			alert ("What is your company's annual budget for Server and Storage Hardware.");
			myFocus=document.getElementById("ORG_COMP_SYS");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_HARDWARE"))//bsl
	{					
		if (!CheckedRadioValue(document.subscribe.ORG_HARDWARE))
		{
			alert ("What is your company's annual budget for Server and Storage Hardware.");
			myFocus=document.getElementById("ORG_HARDWARE");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("ORG_TELECOMMUNICATION"))
	{			
		if (!CheckedRadioValue(document.subscribe.ORG_TELECOMMUNICATION))
		{
			alert ("What is your company's annual budget for Telecommunications.");
			myFocus=document.getElementById("ORG_TELECOMMUNICATION");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (document.getElementById("ORG_TRAINING"))
	{		
		if (!CheckedRadioValue(document.subscribe.ORG_TRAINING))
		{
			alert ("What is your company's annual budget for Training.");
			myFocus=document.getElementById("ORG_TRAINING");
			myFocus.scrollIntoView(true);
			return false;
		}		
	}	
	if (document.getElementById("ORG_VIRTUALIZATION"))
	{	
		if (!CheckedRadioValue(document.subscribe.ORG_VIRTUALIZATION))
		{
			alert ("What is your company's annual budget for Virtualization.");
			myFocus=document.getElementById("ORG_VIRTUALIZATION");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}		
	if (document.getElementById("BUDGET"))
	{	

		if (!CheckDropdown(document.subscribe.BUDGET))
		{
			alert ("What percentage of the annual budget are you personally involved with.");
			myFocus=document.getElementById("BUDGET");
			myFocus.scrollIntoView(true);
			return false;
		}	
	}	
	if (!CheckedRadioValue(document.subscribe.RESELL_IT))
	{
		alert ("Please specify whether you resell IT products and services.");
		myFocus=document.getElementById("RESELL_IT");
		myFocus.scrollIntoView(true);
		return false;
	}

	if (!CheckDropdown(document.subscribe.PERSONAL_ID))
	{
		alert ("Please specify your personal identifier.");
        	document.subscribe.PERSONAL_ID.focus();
		return false;
	}

//	if (!CheckedRadioValue(document.subscribe.REQUESTED_VERSION))
//	{
	//	alert ("Please specify In which format in would you like to receive " + descr + ".");
//		myFocus=document.getElementById("REQUESTED_VERSION");
//		myFocus.scrollIntoView(true);
//		return false;
//	}
	if(document.subscribe.templ.value!="DIG"  )
	{

		if ((ObjectExists(document.subscribe,"EWK_REQUESTED_VERSION"))&&
(document.subscribe.EWK_RECEIVE_YES_NO[0].checked == true))
		{
			if(document.subscribe.EWK_REQUESTED_VERSION[0].checked == false && document.subscribe.EWK_REQUESTED_VERSION[1].checked == false)
			{
			alert ("Please specify in which format in would you like to receive eWEEK." );
        		document.subscribe.EWK_REQUESTED_VERSION[0].focus();
			return false;
			}
		}	
	
		if ((ObjectExists(document.subscribe,"BSL_REQUESTED_VERSION"))&&
(document.subscribe.BSL_RECEIVE_YES_NO[0].checked == true))
		{
			if(document.subscribe.BSL_REQUESTED_VERSION[0].checked == false && document.subscribe.BSL_REQUESTED_VERSION[1].checked == false)
			{
				alert ("Please specify in which format in would you like to receive Baseline." );
        		document.subscribe.BSL_REQUESTED_VERSION[0].focus();
			return false;
			}
		}	
		if ((ObjectExists(document.subscribe,"IST_REQUESTED_VERSION"))&&
(document.subscribe.IST_RECEIVE_YES_NO[0].checked == true))
		{
			if(document.subscribe.IST_REQUESTED_VERSION[0].checked == false && document.subscribe.IST_REQUESTED_VERSION[1].checked == false)
			{
			alert ("Please specify in which format in would you like to receive CIO Insight." );
        		document.subscribe.IST_REQUESTED_VERSION[0].focus();
			return false;
			}
		}	
	}
	
	return true;
}




function CheckDropdown(selectBox)
{
	if(selectBox.selectedIndex == "0")
	{
		return false;
	}
	else
	{
		return true;
         }
}

function CheckUnselects(radioItem)
{
	for(i=0;i<radioItem.length;i++)
	{
		if(radioItem[i].checked)
		{
			return true;
		}//end if
	}//end for
	return false;
}
 
var i;

// two arrays for Canadian province/postal code validation
var CanCodes=new Array("54","55","56","57","58","59","60","66","61","62","63","64","65");
var CanLetters=new Array("T","UV","R","E","A","B","X","X","KLMNP","C","GHJK","S","Y");

// check if first letter of postal code matches selected Canadian province
// StateCD is 2-digit code that Omeda uses to identify Canadian provinces (value of STATE field)
// PostCD is entered postal code (value of ZIPCODE field)
function ValidCanPostal(StateCD, PostCD)
{
	var fletter=PostCD.substring(0,1);
	fletter = fletter.toUpperCase();

	for(i=0;i<13;i++)
	{
		if (StateCD==CanCodes[i])
		{
			if (CanLetters[i].indexOf(fletter,0) == -1)
			{
				return false;
			}
			else
			{
				return true;
			}
		}
	}
	return true;
}
function IsCanadian(StateCD)
{
	for(i=0;i<13;i++)
	{
		if (StateCD==CanCodes[i])
		{
			return true;
		}
	}
	return false;
}

function ObjectExists(form,fieldname)
{
	for ( i=0; i < form.elements.length; i++)
	{
		if (form.elements[i].name == fieldname)
		{
			return true;
		}
	}
	return false;
}

function CheckboxChecked(CheckBoxName)
{
var ChLength = CheckBoxName.length + 1;
var vName = CheckBoxName + "-";

CBindex = 0;
	for ( i=0; i < document.subscribe.elements.length; i++)
	{
		if (document.subscribe.elements[i].type == "checkbox")
		{
			if (document.subscribe.elements[i].name.substring(0,ChLength)==vName)
			{
				if (CBindex==0) {CBindex = i;}
				if (document.subscribe.elements[i].checked)
				{
					return true;
					break;
				}
			}
		}

	}
	//document.qualform.elements[CBindex].focus();
	return false;
}
function checkEmailValue(emailValue)
{     //runs the validate script and returns error box or nonerror

	if (emailValue == "")
	{
		alert("You have not entered email address. Please re-enter it.");
		return false;
	}

	startPos = 0;

	commaPos = emailValue.indexOf(",",startPos+1);	//position of semicolomn
	while (commaPos != -1)
	{
		endPos = commaPos;
		emailElement = emailValue.substring(startPos,endPos);
		if(!validEmail(emailElement))
		{
			alert("You have entered an invalid email address. Please re-enter it.");
			return false;
		}
		startPos = endPos + 1;		
		commaPos = emailValue.indexOf(",",startPos);	//position of semicolomn
	}
	endPos = emailValue.length;
	emailElement = emailValue.substring(startPos,endPos);

	if(!validEmail(emailElement))
	{
		alert("You have entered an invalid email address. Please re-enter it.");
		return false;
	}
	return true;		
}				

function validEmail(email)
{
	invalidchars = " /:;"

	if(email == "")
	{			//checks to see if blank field
		return false;
	}
			
	for(i=0;i<invalidchars.length;i++)
	{ //checks for invalid chars
			
		badchars = invalidchars.charAt(i);
			
		if(email.indexOf(badchars,0)!= -1)
		{
			return false;
		}
	}
	
	atPos = email.indexOf("@",1)  //holds position of "@"
			
	if(atPos == -1) 
	{	//checks to see if "@" present
		return false;
	}
							
	if(email.indexOf("@",atPos+1) != -1) 
	{ //checks for second "@"
		return false;
	}
							
	periodPos = email.indexOf(".",atPos) //holds position of "."
			
	if(periodPos == -1)
	{ //checks for presence of "."
		return false;
	}
	if(periodPos+3 > email.length)
	{//makes sure at least two chars after the period
		return false;
	}
	return true;
}
function CheckedRadioValue(radioItem)
{
	if (!(radioItem.length > 0)) {return true}
	for(i=0;i<radioItem.length;i++)
	{
		if(radioItem[i].checked)
		{
			return radioItem[i].value;
		}//end if
	}//end for
	return false;
}
function SelectedValue(selectItem)
{
	return selectItem[selectItem.selectedIndex].value;
}

