/* General Scripts for Highlights Parents */


function ValidateNSubmit(){
		document.EmailCaption.action="http://www.highlightsparents.com/newsletter_sign_up.jsp?EMAIL="+document.EmailCaption.EMAIL.value;
        document.EmailCaption.method="POST";
        document.EmailCaption.submit();
		}



function popupPoll(URL, popupName) {
	if (! window.focus)return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	window.open(href, popupName, 'height=500,width=800,left=30,top=30,scrollbars=1,resizable=1');
	return false;
	}

	
function parseURL(name) //This function parses the referrer URL string and grabs the parameter we sent via "name".
	{
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp(regexS);
	var results = regex.exec(window.location.href); 
	if (results == null){
		return "";
		}
	else {
		return results[1];
		}
	}
	
	

	