	// ------------------------------------------------------
	// Click Functions - new site August 2005
	// ------------------------------------------------------
	var thisSitesUrl = "http://www.clickintopr.com/";
	
	var defaultBookmarkUrl = "http://www.clickintopr.com";
	var defaultBookmarkTitle = "CLICKintoPR - easy\, affordable pr for everyone";

	// ---------------------------------------------
	// FIXED FUNCTIONS
	// ---------------------------------------------

	function removeSpaces(string) {
		var tstring = "";
		string = '' + string;
		splitstring = string.split(" ");
		for(i = 0; i < splitstring.length; i++)
		tstring += splitstring[i];
		return tstring;
	}

	function show(divid)
	{
		document.getElementById(divid).style.display = "block";
		document.getElementById(divid).style.visibility = "visible";
	}

	function hide(divid)
	{
		document.getElementById(divid).style.display = "none";
		document.getElementById(divid).style.visibility = "hidden";
	}

	function previewFeature(projectID)
	{
		var url = "preview_feature.asp?projectID="+projectID;
		var previewWin = window.open(url,"previewWin","height=550,width=650,top=0,left=0,scrollbars");
		previewWin.focus();
	}

	function activeWinSize() {
		var myWidth = 0, myHeight = 0;
		  if( typeof( window.innerWidth ) == 'number' ) {
		    //Non-IE
		    myWidth = window.innerWidth;
		    myHeight = window.innerHeight;
		  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		    //IE 6+ in 'standards compliant mode'
		    //myWidth = document.documentElement.clientWidth;
		    //myHeight = document.documentElement.clientHeight;
		    myWidth = window.innerWidth;
		    myHeight = window.innerHeight;		    
		  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		    //IE 4 compatible
		    myWidth = document.body.clientWidth;
		    myHeight = document.body.clientHeight;
		  }
		  //window.alert( 'Width = ' + myWidth );
		  //window.alert( 'Height = ' + myHeight );
		var activeWinWidth = myWidth;
		var activeWinHeight = myHeight;
	}

	function activeWinSize2(width,height){

		activeWinWidth = window.screenX;
		activeWinTop = window.screenY;
		var centerX = 0;
		var centerY = 0;
		var left = 0;
		var top = 0;
	
		   if (window.screenX != null && window.outerWidth) {
		      centerX = window.screenX + (window.outerWidth / 2);
		      centerY = window.screenY + (window.outerHeight / 2);
			left = window.screenX //+ window.outerWidth;
			top = window.screenY //+ window.outerHeight;
		   }
		   else if (window.screenLeft) {
		      if (document.documentElement) {
		         centerX = window.screenLeft + (document.documentElement.offsetWidth / 2);
		         centerY = window.screenTop + (document.documentElement.offsetHeight / 2);
			left = window.screenLeft //+ document.documentElement.offsetWidth;
			top = window.screenTop //+ document.documentElement.offsetHeight;
		      }
		      else if (document.body && document.body.offsetWidth) {
		         centerX = window.screenLeft + (document.body.offsetWidth / 2);
		         centerY = window.screenTop + (document.body.offsetHeight / 2);
			left = window.screenLeft //+ document.documentElement.offsetWidth;
			top = window.screenTop //+ document.documentElement.offsetHeight;
		      }
		   }
		   //var x = parseInt(centerX - (width / 2));
		   //var y = parseInt(centerY - (height / 2));
		//var x = parseInt(centerX - (left /2));
		//var y = parseInt(centerY - (top /2))
		x = left;
		y = top;

		activeWinLeft = x;
		activeWinTop = y;

	}

	function CurrencyPopup(amount){
		CurrencyWindow = window.open ('', 'CurrencyWindow', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,height=170,width=600')
		CurrencyWindow.focus()
		CurrencyWindow.location.href = "http://www.xe.com/pca/input.php?amount=" + amount + "&From=GBP";
	}

	function displayDate(){

		var dToday = new Date();
		var dyNum = dToday.getDay();
		var dyOfMonth = dToday.getDate();
		var dyName = "";
		var mnName = "";
		var mnNum = dToday.getMonth();
		var yrNum = dToday.getFullYear();
	
		var mnArray = new Array(12)
		mnArray[0] = "January"
		mnArray[1] = "February"
		mnArray[2] = "March"
		mnArray[3] = "April"
		mnArray[4] = "May"
		mnArray[5] = "June"
		mnArray[6] = "July"
		mnArray[7] = "August"
		mnArray[8] = "September"
		mnArray[9] = "October"
		mnArray[10] = "November"
		mnArray[11] = "December"
		mnName = mnArray[mnNum];
	
		var dyNmeArray = new Array(7);
		dyNmeArray[1] = "Monday";
		dyNmeArray[2] = "Tuesday";
		dyNmeArray[3] = "Wednesday";
		dyNmeArray[4] = "Thursday";
		dyNmeArray[5] = "Friday";
		dyNmeArray[6] = "Saturday";
		dyNmeArray[7] = "Sunday";
		dyName = dyNmeArray[dyNum];
		// alert(mnArray[mnNum]);
	
		// FORMAT: Thursday: August 11 2005
		var tDate =  dyName + ": " + mnName + " " +dyOfMonth + " " + yrNum;

		document.write(tDate);	
	}
	
	function toMoney( n ) {
		n = Math.round(n*100)/100;
		if(n.toFixed){
			return n.toFixed(2);
		}else{
			return ~~n+'.'+String(Math.round((n?n:1)*100)).slice(-2);
		}
	 }

	function proxyUpdate() {
		var theForm = document.forms.newPForm;
		//theForm.action = "edit_svd_project.asp?upd=1";
		theForm.submitToWorldPay_proxy.value = "proxypay";
		theForm.submit();
	}

	function updateForm(updMe) {
		var theForm = document.forms.newPForm;
		theForm.action = "edit_svd_project.asp?upd=1";
		theForm.updateMe.value = "yes";
		theForm.submit();
	}
	
	function updateFormAccountRet(updMe) {
		var theForm = document.forms.newPForm;
		theForm.action = "edit_svd_project.asp?upd=1&accret=1";
		theForm.updateMe.value = "yes";
		theForm.submit();
	}
	
	function updateProjectWebPresspackPrice(start_cost){
		
		var theForm = document.forms.newPForm;
		var project_cost = start_cost;
		var thisField = "";
		var thisArray = "";
		var thisCost = "";
		var enhancementCount = theForm.svc_enhancements.value;
		var requiredPages = theForm.requiredPages.value;
		
		project_cost = project_cost * requiredPages;
		
		//document.getElementById('priceHolderTop').innerHTML = "<font class='copyText3'><u>Project Cost: <font class='copyText'>£"+toMoney(project_cost)+"</font></u></font>";
		document.getElementById('priceHolderBottom').innerHTML = "<font class='copyText3'><u>Project Total Cost: <font class='copyText'>£<a class='startEndCost' href='javascript:CurrencyPopup("+toMoney(project_cost)+");' onMouseover=\"ddrivetip('convert to US dollars','pink', 110)\"; onMouseout=\"hideddrivetip()\">"+toMoney(project_cost)+"</a> - <font class='copyText3'>(£"+(toMoney(project_cost * 1.175))+" inc vat)</font></font></u></font>";
		theForm.project_total_cost.value = toMoney(project_cost);
	
	}
		
	function updateProjectPrice(start_cost,svc_cost){
		
		var theForm = document.forms.newPForm;
		var project_cost = start_cost;
		var thisField = "";
		var thisArray = "";
		var thisCost = "";
		var enhancementCount = theForm.svc_enhancements.value;
		
		if(enhancementCount== ""){
			enhancementCount= 1;
		}
		
		for(i = 1;i<=enhancementCount;i++){
			thisField = eval("theForm.enHancement" + i);
			if(thisField.checked == true){
				thisArray = thisField.value.split("^");
				thisCost = parseFloat(thisArray[2]);
				project_cost = project_cost +thisCost;
			}
		}
		
		//document.getElementById('priceHolderTop').innerHTML = "<font class='copyText3'><u>Project Cost: <font class='copyText'>£"+toMoney(project_cost)+"</font></u></font>";
		document.getElementById('priceHolderBottom').innerHTML = "<font class='copyText3'><u>Project Total Cost: <font class='copyText'>£<a class='startEndCost' href='http://www.xe.com/pca/launch.cgi?Amount="+toMoney(project_cost)+"&From=GBP' onMouseover=\"ddrivetip('convert to US dollars','pink', 110)\"; onMouseout=\"hideddrivetip()\">"+toMoney(project_cost)+"</a> - <font class='copyText3'>(£"+(toMoney(project_cost * 1.175))+" inc vat)</font></font></u></font>";
		theForm.project_total_cost.value = toMoney(project_cost);
	}

	function setFocus(frmName,fldName) {
	
		var theForm = eval("document.forms."+frmName);
		var theField = eval("theForm."+fldName);
		theField.focus();

	}
	
	function selField(frmName,fldName){
	
		var theForm = eval("document.forms."+frmName);
		var theField = eval("theForm."+fldName);
		theField.select();
	
	}

	function bookmarkPage(bookmarkurl,bookmarktitle){

		if(bookmarkurl == ""){
			bookmarkurl=defaultBookmarkUrl ;
		}
		if(bookmarktitle == ""){
			bookmarktitle=defaultBookmarkTitle;
		}
		if(document.all){
			window.external.AddFavorite(bookmarkurl,bookmarktitle);
		} 
	
	}
	
	function showBookmark(){
	
		var txt = "Bookmark this page!";
		var ver = navigator.appName
		var num = parseInt(navigator.appVersion)
		if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
		   document.write('<a class="type5" ')
		   document.write('onmouseover="window.status=\'bookmark this page\'; return true;" ');
		   document.write('onmouseout="window.status=\'\'" ');
		   document.write('href="javascript:bookmarkPage(\'\',\'\');"');
		   document.write('>'+txt+'</a>')
		}else{
		   txt += "  (Ctrl+D)"
		   document.write('<font class="copyText">')
		   document.write(txt)
		   document.write('</font>');
		} 	
	
	}

	// -------------------------------------------------------
	// VALIDATORS
	// -------------------------------------------------------

	function echeck(str) {

		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		var badCharString = "";
		if (str.indexOf(at)==-1){
			alert("please enter a valid e-mail address");
			return false;
		}
		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
			alert("please enter a valid e-mail address");
			return false;
		}
		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
			alert("please enter a valid e-mail address");
			return false;
		}
		if (str.indexOf(at,(lat+1))!=-1){
			alert("please enter a valid e-mail address");
			return false;
		}
		if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
			alert("please enter a valid e-mail address");
			return false;
		}
		if (str.indexOf(dot,(lat+2))==-1){
			alert("please enter a valid e-mail address");
			return false;
		}
		if (str.indexOf(" ")!=-1){
			alert("please enter a valid e-mail address");
			return false;
		}
		return true;        
	}

	function validateContactForm(){

		var theForm = document.forms.contactForm;

		if(theForm.name.value == "" || theForm.name.value == " "){
			alert("Please enter your name");
			theForm.name.focus();
			return false;
		}

		if(theForm.emailAddress.value == "" || theForm.emailAddress.value == " "){
			alert("Please enter the email address where we can contact you");
			theForm.emailAddress.focus();
			return false;
		}

		if(theForm.message.value == "" || theForm.message.value == " "){
			alert("Please enter your message");
			theForm.message.focus();
			return false;
		}

		if(document.getElementById("codestring").value == ""){
			alert("Please enter the code as shown");
			document.getElementById("codestring").select();
			return false;
		}
		document.getElementById("codestring").value = removeSpaces(document.getElementById("codestring").value);
		if(document.getElementById("codestring").value.toUpperCase() != document.getElementById("checkcodestring").value){
			alert("Please enter the code as shown");
			document.getElementById("codestring").select();
			return false;
		}

	}

	function validateRegInterest(){
	
		var theForm = document.forms.int_registerForm;

		if(theForm.int_firstName.value == "" || theForm.int_firstName.value == " "){
			alert("Please enter your first name");
			theForm.int_firstName.focus();
			return false;
		}

		if(theForm.int_lastName.value == "" || theForm.int_lastName.value == " "){
			alert("Please enter your last name");
			theForm.int_lastName.focus();
			return false;
		}

		if(theForm.int_emailAddress.value == "" || theForm.int_emailAddress.value == " "){
			alert("Please enter your email address so we can contact you.");
			theForm.int_emailAddress.focus();
			return false;
		}

		if(theForm.int_lookingFor.value == "" || theForm.int_lookingFor.value == " "){
			alert("Please let us know the type of article(s) you are seeking");
			theForm.int_lookingFor.focus();
			return false;
		}
			
	}

	function validateEmailAddressReq(){
	
		var theForm = document.forms.emailAddressReqForm;
		
		if(theForm.emailAddress.value == "" || theForm.emailAddress.value == " "){
			alert("Please enter your registered email address");
			theForm.emailAddress.focus();
			return false;
		}
	
	}
	
	function validateLogin() {
	
		var theForm = document.forms.loginForm;
		var emailID = theForm.emailAddress;
	  
		if ((emailID.value==null)||(emailID.value=="")){
			alert("Please enter your email address");
			emailID.focus();
			return false;
		}
		if (echeck(emailID.value)==false){
			//emailID.value="";
			emailID.select();
			return false;
		}
		
		if(theForm.userPassword.value == "" || theForm.userPassword.value == " " || theForm.userPassword.value == " ENTER your password" || theForm.userPassword.value == "ENTER your password"){
			alert("please enter your password");
			theForm.userPassword.focus();
			return false;
		}		
	}
	
	function validateSearch() {
	
		var theForm = document.forms.searchForm;
		
		if(theForm.searchPhrase.value == "" || theForm.searchPhrase.value == " "){
			alert("please enter your search criteria");
			theForm.searchPhrase.focus();
			return false;
		}		
	}

	function validateRegistration() {
		var theForm = document.forms.registrationForm;
		
		var namestr = "";
		var a;
		a = theForm.elements.length;
		
		for(var counter=0;counter<a;counter++){
			namestr = theForm.elements[counter].name;
			// alert(namestr)

			//first name
			if(namestr.match(/firstName/) || namestr.match(/firstname/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-]{1,20}$/)){
					alert("Please fill in an appropriate name value");
					theForm.elements[counter].focus();
					document.all.fName.innerHTML = "<font class='fName' class='redText'>First Name</font>";
					return false;
				}else{
					document.all.fName.innerHTML = "<font class='fName' class='copyText'>First Name</font>";
				}
			}

			//last name
			if(namestr.match(/lastName/) || namestr.match(/lastname/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-]{2,20}$/)){
					alert("Please fill in an appropriate surname value");
					theForm.elements[counter].focus();
					document.all.lName.innerHTML = "<font class='lName' class='redText'>Surname</font>";
					return false;
				}else{
					document.all.lName.innerHTML = "<font class='lName' class='copyText'>Surname</font>";
				}
			}
/*		
			//address1
			if(namestr.match(/Addr1/) || namestr.match(/addr1/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-,]{1,40}$/)){
					alert("Please fill in an appropriate building number/name value");
					theForm.elements[counter].focus();
					document.all.buildNo.innerHTML = "<font class='buildNo' class='redText'>Building No./Name</font>";
					return false;
				}else{
					document.all.buildNo.innerHTML = "<font class='buildNo' class='copyText'>Building No./Name</font>";
				}
			}

			//address2
			if(namestr.match(/Address2/) || namestr.match(/address2/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-,]{2,40}$/)){
					alert("Please fill in an appropriate street value");
					theForm.elements[counter].focus();
					document.all.street.innerHTML = "<font class='street' class='redText'>Street</font>";
					return false;
				}else{
					document.all.street.innerHTML = "<font class='street' class='copyText'>Street</font>";
				}
			}
			
			//town
			if(namestr.match(/Town/) || namestr.match(/town/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-]{2,40}$/)){
					alert("Please fill in an appropriate town value");
					theForm.elements[counter].focus();
					document.all.town.innerHTML = "<font class='town' class='redText'>Town</font>";
					return false;
				}else{
					document.all.town.innerHTML = "<font class='town' class='copyText'>Town</font>";
				}
			}

*/
			
			//county
/*			if(namestr.match(/County/) || namestr.match(/county/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-]{2,40}$/)){
					alert("Please fill in an appropriate county/state value");
					theForm.elements[counter].focus();
					document.all.county.innerHTML = "<font class='county' class='redText'>County/State</font>";
					return false;
				}else{
					document.all.county.innerHTML = "<font class='county' class='copyText'>County/State</font>";
				}
			}			
				
			//postcode
			if(namestr.match(/Postcode/) || namestr.match(/postcode/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9]{2,4} *[a-zA-Z0-9]{2,4}$/)){
					alert("Please fill in an appropriate postcode value");
					theForm.elements[counter].focus();
					document.all.pCode.innerHTML = "<font class='pCode' class='redText'>Postal/Zip Code</font>";
					return false;
				}else{
					document.all.pCode.innerHTML = "<font class='pCode' class='copyText'>Postal/Zip Code</font>";
				}
			}
*/

			//Country
			if(namestr.match(/country_verified/)){
				if(theForm.country_verified.checked != true){
					alert("Please verify you have selected your correct country\n\nThe country selected will be used as country of origin for billing purposes.");
					theForm.country_verified.focus();
					document.all.countryTtl.innerHTML = "<font id='countryTtl' class='redText'>Country</font>";
					return false;
				}else{
					document.all.countryTtl.innerHTML = "<font id='countryTtl' class='copyText'>Country</font>";
				}
			}	
			
			//email
			//if(namestr.match(/email/)){
			//	if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9\-_\.]*\@[a-zA-Z0-9\-]{2,}(\.)?([a-zA-Z]{2})?\.[a-zA-Z]{2,4}$/)){
			//		alert("Please fill in an appropriate Email value");
			//		theForm.elements[counter].focus();
			//		document.all.email.innerHTML = "<font class='email' class='redText'>Email address</font>";
			//		return false;
			//	}else{
			//		document.all.email.innerHTML = "<font class='email' class='copyText'>Email Address</font>";
			//	}
			//}
		
			//telephone
/*			if(namestr.match(/Telephone/) || namestr.match(/telephone/)){
				if(! theForm.elements[counter].value.match(/^[0-9 +\-]{10,16}$/)){
					alert("Please fill in an appropriate Telephone Number value");
					theForm.elements[counter].focus();
					document.all.telNo.innerHTML = "<font class='telNo' class='redText'>Telephone number</font>";
					return false;
				}else{
					document.all.telNo.innerHTML = "<font class='telNo' class='copyText'>Telephone number</font>";
				}
			}
*/
			//username
/*			if(namestr.match(/UserName/) || namestr.match(/userName/) || namestr.match(/username/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-]{2,40}$/)){
					alert("Please fill in an appropriate username value");
					theForm.elements[counter].focus();
					document.all.username.innerHTML = "<font class='username' class='redText'>Username</font>";
					return false;
				}else{
					document.all.username.innerHTML = "<font class='username' class='copyText'>Username</font>";
				}
			}
*/			
			//password
			if(namestr.match(/userPassword/) || namestr.match(/userPassword/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-]{2,40}$/)){
					alert("Please fill in an appropriate password value");
					theForm.elements[counter].focus();
					document.all.password.innerHTML = "<font class='password' class='redText'>Password</font>";
					return false;
				}else{
					document.all.password.innerHTML = "<font class='password' class='copyText'>Password</font>";
				}
			}
			
			//pasword confirm
			if(namestr.match(/PasswordConf/) || namestr.match(/passwordConf/)){
				if(theForm.elements[counter].value != theForm.elements[(counter-1)].value){
					alert("Your chosen passwords do not match");
					theForm.elements[counter].focus();
					document.all.password2.innerHTML = "<font class='password2' class='redText'>Repeat Password</font>";
					return false;
				}else{
					document.all.password2.innerHTML = "<font class='fName' class='copyText'>Repeat Password</font>";
				}
			}			
		
			//alphanum
/*			if(namestr.match(/alphanum/)){
				if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-\.,]*$/)){
					alert("Please fill in an appropriate Text value");
					theForm.elements[counter].focus();
					// document.all.fName.innerHTML = "<font class='fName' class='redText'>First Name</font>";
					return false;
				}else{
					//document.all.fName.innerHTML = "<font class='fName' class='copyText'>First Name</font>";
				}
				
			}
*/			

		}
	
	}

	function validateProject() {
	
		var theForm = document.forms.newPForm;
		theForm.action = "new_project_accept.asp?isNew=1"
		theForm.target="_self"
		
		var namestr = "";
		var a;
		a = theForm.elements.length;
		
		for(var counter=0;counter<a;counter++){
			namestr = theForm.elements[counter].name;
			// alert(namestr)

			//q1 - 10
			if(namestr.match(/q1/) || namestr.match(/q2/) || namestr.match(/q3/) || namestr.match(/q4/) || namestr.match(/q5/) || namestr.match(/q9/) || namestr.match(/q10/)){
				//if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-,#!?.]{2,500}$/)){
				if(theForm.elements[counter].value == "" || theForm.elements[counter].value == " "){
					alert("Please complete the required information for question " + (counter));
					theForm.elements[counter].focus();
					return false;
				}
			}
			
			//if((theForm.reg1.checked != true && theForm.reg2.checked != true && theForm.reg3.checked != true)){
			if((theForm.reg1.checked != true && theForm.reg3.checked != true)){
				alert("Please select at least one region in which to publish this release");
				theForm.reg1.focus();
				return false;
			}
			
		}		
	
	}

	function validateNewWpp1Project(qCount) {
	
		var theForm = document.forms.newPForm;
		//theForm.action = "storeandgo.asp?isNew=1"
		//theForm.target="_self"
		
		var namestr = "";
		var a;
		a = qCount;
		var gotoReg = 1;
		var theField = "";
		
		for(i=1;i<=qCount;i++){
			//alert(i);
			for(n=1;n<=4;n++){
					theField = eval("theForm.q"+n+"_"+i)
					
					if(theField.value == "" || theField.value == " "){
						alert("Please complete the required information for question " +n+" of page "+ i+"\n\nIf the question is non-applicable please enter 'X' to show that you have read the option");
						theField.focus();
						return false;
						gotoReg = 0;
					}
			}
		}
		theForm.qCount = qCount;
		//document.write(qCount);
		//return false;
	}

	function validateNewWppProject(qCount) {
	
		var theForm = document.forms.newPForm;
		//theForm.action = "storeandgo.asp?isNew=1"
		//theForm.target="_self"
		
		var namestr = "";
		var a;
		a = qCount;
		var gotoReg = 1;
		var theField = "";
		
		for(i=1;i<=qCount;i++){
			//alert(i);
			for(n=1;n<=4;n++){
					theField = eval("theForm.q"+n+"_"+i)
					
					if(theField.value == "" || theField.value == " "){
						alert("Please complete the required information for question " +n+" of page "+ i+"\n\nIf the question is non-applicable please enter 'X' to show that you have read the option");
						theField.focus();
						return false;
						gotoReg = 0;
					}
			}
		}
		//document.write(qCount);
		//return false;
	}

	function validateNewProject() {
	
		var theForm = document.forms.newPForm;
		//theForm.action = "storeandgo.asp?isNew=1"
		//theForm.target="_self"
		
		var namestr = "";
		var a;
		a = theForm.elements.length;
		var gotoReg = 1;
		var theField = "";
		
		for(i=1;i<=10;i++){
		
			theField = eval("theForm.q"+i)
			if(theField.value == "" || theField.value == " "){
				alert("Please complete the required information for question " + i+"\n\nIf the question is non-applicable please enter 'X' to show that you have read the option");
				theField.focus();
				return false;
				gotoReg = 0;
			}
		}
			
		if(gotoReg == 1){
			//if((theForm.reg1.checked != true && theForm.reg2.checked != true && theForm.reg3.checked != true)){
			//if((theForm.region1.checked != true && theForm.region3.checked != true)){
			//	alert("Please select at least one region in which to publish this release");
			//	theForm.reg1.checked = true;
			//	return false;
			//}
		}
			
/*		for(counter=1;counter<a;counter++){
			namestr = theForm.elements[counter].name;
			// alert(namestr)

			//q1 - 10
			if(namestr.match(/q1/) || namestr.match(/q2/) || namestr.match(/q3/) || namestr.match(/q4/) || namestr.match(/q5/) || namestr.match(/q6/) || namestr.match(/q7/) || namestr.match(/q8/) || namestr.match(/q9/) || namestr.match(/q10/)){
				//if(! theForm.elements[counter].value.match(/^[a-zA-Z0-9 \-,#!?.]{2,500}$/)){
				if(theForm.elements[counter].value == "" || theForm.elements[counter].value == " "){
					alert("Please complete the required information for question " + counter);
					theForm.elements[counter].focus();
					return false;
					gotoReg = 0;
				}
			}
			
			if(gotoReg == 1){
				//if((theForm.reg1.checked != true && theForm.reg2.checked != true && theForm.reg3.checked != true)){
				if((theForm.reg1.checked != true && theForm.reg3.checked != true)){
					alert("Please select at least one region in which to publish this release");
					theForm.reg1.focus();
					return false;
				}
			}
			
		}
	*/	
	
	}

	// -------------------------------------------------------
	// DOWNLOADING STUFF
	// -------------------------------------------------------
	function getPDF(projectID){
	
		var url = thisSitesUrl+"images/projects/"+projectID+".pdf";
		// var url = "viewPDF.asp?projectID=<%'=projectID%>";
		var pdfWin = window.open(url,"pdfWin","scrollbars=yes");
		pdfWin.focus();
	
	}
	
	function printText(pjID,pjTTL) {
	
		var url = "printText.asp?pjID="+pjID+"&pjTTL="+ pjTTL;
		var vwWidth = 10;
		var vwHeight = 10;
		var prnWin = window.open(url,"viewWin","width="+vwWidth+",height="+vwHeight+",scrollbars=yes,resize=1")
		// prnWin.moveTo( ((screen.width / 2) - (vwWidth /2)), ((screen.height / 2) - (vwHeight /2)) );
		prnWin.moveTo( (-200), (-1) );
		prnWin.blur();
	}
	
	function dlText(pjID,pTTL) {
		document.location.href = "download_text.asp?pjID="+pjID+"&pName="+pTTL;
	}
	
	function dlImage(ok2go,pjID,pjTTL,fileExt,flSize) {
		if(ok2go == 1){
			document.location.href = "download_image.asp?pjID="+pjID+"&pName="+pjTTL+"&pExt="+fileExt+"&Size="+flSize;
		}else{
			alert("Image not available for download");
		}
	}
	
	//------------------------------------------------------------
	// WINDOW POPUPS / Redirects
	//------------------------------------------------------------

	function showCopy(pjID,itemNum) {
	
		//var url = "writePPwCopy.asp?pjID="+pjID+"&item="+ itemNum;
		//var vwWidth = 500;
		//var vwHeight = 500;
		alert("copy");
		//var copyWin = window.open(url,"copyWin","width="+vwWidth+",left="+((screen.width / 2) - (vwWidth /2))+",top="+((screen.height / 2) - (vwHeight /2))+",height="+vwHeight+",scrollbars=no,status=no")
		//copyWin.moveTo( ((screen.width / 2) - (vwWidth /2)), ((screen.height / 2) - (vwHeight /2)) );
		//copyWin.focus();
	
	}

	function selImage2(pjID,mImg) {
	
		var url = "selectImage.asp?nsv=1&pjID="+pjID+"&mi="+mImg;
		var vwWidth = 500;
		var vwHeight = 300;
		var theForm = document.forms.newPForm;
		theForm.action = "edit_svd_project.asp?upd=1";
		theForm.updateMe.value = "yes";
		theForm.submit();
		var imgWin = window.open(url,"viewWin","width="+vwWidth+",left="+((screen.width / 2) - (vwWidth /2))+",top="+((screen.height / 2) - (vwHeight /2))+",height="+vwHeight+",scrollbars=no,status=no")
		//imgWin.moveTo( ((screen.width / 2) - (vwWidth /2)), ((screen.height / 2) - (vwHeight /2)) );
		imgWin.focus();
	
	}
	
	function selImageOnly(pjID,mImg) {
	
		var url = thisSitesUrl + "includes/blank.htm";
		var vwWidth = 500;
		var vwHeight = 300;
		var theForm = document.forms.newPForm;
		theForm.action = "selectImagesOnly.asp?pjID="+pjID+"&mi="+mImg;
		//theForm.updateMe.value = "yes";
		var imgWin = window.open(url,"imgWin","width="+vwWidth+",left="+((screen.width / 2) - (vwWidth /2))+",top="+((screen.height / 2) - (vwHeight /2))+",height="+vwHeight+",scrollbars=no,status=no")
		//imgWin.moveTo( ((screen.width / 2) - (vwWidth /2)), ((screen.height / 2) - (vwHeight /2)) );
		theForm.submit();
		document.forms.edit_project_form.submit();
		imgWin.focus();
	
	}
	
	function deleteProject(prjID) {
	
		if(isNaN(prjID)){
		
		}else{
			// document.location.href = thisSitesUrl + "open_project/edit_project.asp?pjID=" +prjID;
			var confMssg = "You are about to delete thias project and associated files!\n\nTo continue click OK";
			if(confirm(confMssg)){
				document.location.href = thisSitesUrl + "clients/open_project/delete_project.asp?pjID=" +prjID;
			}
		}
	
	}

	function goEditProject(prjID) {
	
		if(isNaN(prjID)){
		
		}else{
			// document.location.href = thisSitesUrl + "open_project/edit_project.asp?pjID=" +prjID;
			document.location.href = thisSitesUrl + "clients/open_project/edit_svd_project.asp?pjID=" +prjID;
		}
	
	}

	function goEditProjectPaid(prjID) {
	
		if(isNaN(prjID)){
		
		}else{
			document.location.href = thisSitesUrl + "clients/open_project/edit_project.asp?pjID=" +prjID;
			//document.location.href = thisSitesUrl + "clients/open_project/edit_svd_project.asp?pjID=" +prjID;
		}
	
	}

	function goEditPresspack(prjID) {
	
		if(isNaN(prjID)){
		
		}else{
			// document.location.href = thisSitesUrl + "open_project/edit_project.asp?pjID=" +prjID;
			document.location.href = thisSitesUrl + "clients/open_project/edit_svd_presspack.asp?pjID=" +prjID;
		}
	
	}

	function goEditPresspackPaid(prjID) {
	
		if(isNaN(prjID)){
		
		}else{
			document.location.href = thisSitesUrl + "clients/open_project/edit_ppW.asp?pjID=" +prjID;
			// document.location.href = thisSitesUrl + "clients/open_project/edit_svd_presspack.asp?pjID=" +prjID;
		}
	
	}

	function goEditPpw(prjID) {
	
		if(isNaN(prjID)){
		
		}else{
			// document.location.href = thisSitesUrl + "open_project/edit_project.asp?pjID=" +prjID;
			document.location.href = thisSitesUrl + "clients/open_project/edit_svd_ppw.asp?pjID=" +prjID;
		}
	
	}
	
	function goEditPpwPaid(prjID) {
	
		if(isNaN(prjID)){
		
		}else{
			// document.location.href = thisSitesUrl + "open_project/edit_project.asp?pjID=" +prjID;
			document.location.href = thisSitesUrl + "clients/open_project/edit_ppW.asp?pjID=" +prjID;
		}
	
	}
	
	function readTerms() {
	
		var url = "../../terms_and_conditions.asp";
		var vwWidth = 550;
		var vwHeight = 550;
		activeWinSize2(vwWidth,vwHeight);
		var vwLeftPos = activeWinLeft;
		var vwTopPos = activeWinTop;
		var imgWin = window.open(url,"termsWin","width="+vwWidth+",height="+vwHeight+",top="+vwTopPos+",left="+vwLeftPos+",scrollbars=yes")
		imgWin.focus();
	
	}
	
	function privacy() {
	
		var url = "../../privacy.asp";
		var vwWidth = 550;
		var vwHeight = 550;
		activeWinSize2(vwWidth,vwHeight);
		var vwLeftPos = activeWinLeft;
		var vwTopPos = activeWinTop;
		var imgWin = window.open(url,"privacyWin","width="+vwWidth+",height="+vwHeight+",top="+vwTopPos+",left="+vwLeftPos+",scrollbars=yes")
		imgWin.focus();
	
	}

	function selImage(prjID,mImg){
	
		// // var url = "storeAndGo.asp?pjID="+prjID+"&isNew=1";
		//var url = "store_and_go.asp?pjID="+prjID+"&isNew=1";
		var url = thisSitesUrl + "includes/blank.htm";
		var vwWidth = 500;
		var vwHeight = 300;
		var theForm = document.forms.newPForm;

		var imgWin = window.open(url,"imgWin","width="+vwWidth+",height="+vwHeight+",top="+((screen.height / 2) - (vwHeight /2))+",left="+((screen.width / 2) - (vwWidth /2))+",scrollbars=no")
		theForm.method="post";
		theForm.target="imgWin";
		// theForm.action = "storeAndGo.asp?pjID="+prjID+"&isNew=1";
		theForm.action = "store_and_go.asp?pjID="+prjID+"&isNew=1&mi="+mImg;
		theForm.submit();

		imgWin.focus();		

	}

	function selPPImage(prjID,imgCount){
	
		// //var url = "storeAndGo.asp?pjID="+prjID+"&isNew=1";
		//var url = "store_and_go.asp?pjID="+prjID+"&isNew=1";
		var url = thisSitesUrl + "includes/blank.htm";
		var vwWidth = 500;
		var vwHeight = 260;
		var theForm = document.forms.newPForm;

		var imgWin = window.open(url,"imgWin","width="+vwWidth+",height="+vwHeight+",top="+((screen.height / 2) - (vwHeight /2))+",left="+((screen.width / 2) - (vwWidth /2))+",scrollbars=no")
		theForm.method="post";
		theForm.target="imgWin";
		// theForm.action = "storeAndGo.asp?pjID="+prjID+"&isNew=1";
		theForm.action = "store_and_go.asp?pjID="+prjID+"&isNew=1&imgCount="+imgCount;
		theForm.submit();

		imgWin.focus();		

	}

	function selPPImage2(prjID,imgCount){
	
		var url = "selectImage_ppw.asp?pjID="+prjID+"&imgCount=" + imgCount;
		var vwWidth = 500;
		var vwHeight = 305;
		var imgWin = window.open(url,"imgWin","width="+vwWidth+",height="+vwHeight+",top="+((screen.height / 2) - (vwHeight /2))+",left="+((screen.width / 2) - (vwWidth /2))+",scrollbars=yes")
		imgWin.focus();		

	}

	function tandcPop(){

		var url = thisSitesUrl + "terms_and_conditions.asp";
		var vwWidth = 550;
		var vwHeight = 550;
		activeWinSize2(vwWidth,vwHeight);
		var vwLeftPos = activeWinLeft;
		var vwTopPos = activeWinTop;
		var tcWin = window.open(url,"tcWin","top="+vwTopPos+",left="+vwLeftPos+",status=no,scrollbars=yes,width="+vwWidth+",height="+vwHeight)
		tcWin.focus();
	
	}
	
	function privacy(){

		var url = thisSitesUrl + "privacy.asp";
		var vwWidth = 550;
		var vwHeight = 320;
		activeWinSize2(vwWidth,vwHeight);
		var vwLeftPos = activeWinLeft;
		var vwTopPos = activeWinTop;
		var tcWin = window.open(url,"pyWin","top="+vwTopPos+",left="+vwLeftPos+",status=no,scrollbars=yes,width="+vwWidth+",height="+vwHeight)
		tcWin.focus();
	
	}
	
	function infPop(pgNme,tbNum){

		var url = thisSitesUrl + "pop_ups.asp?pgNm="+pgNme+"&tblNum="+tbNum;
		var vwWidth = 218
		var vwHeight = 450;
		activeWinSize2(vwWidth,vwHeight);
		var vwLeftPos = activeWinLeft;
		var vwTopPos = activeWinTop;
		if(pgNme == "Example Form  - Answers"){
			var vwWidth = 550;
			var vwHeight = 550;
			activeWinSize2(vwWidth,vwHeight);
			var vwLeftPos = activeWinLeft;
			var vwTopPos = activeWinTop;
			var explWin = window.open(url,"explWin","width="+vwWidth+",height="+vwHeight+",left="+vwLeftPos+",top="+vwTopPos+",scrollbars=yes");
			explWin.focus();
		}else{
			var infWin = window.open(url,"infWin","scrollbars=yes,left="+vwLeftPos+",top="+vwTopPos+",width="+vwWidth+",height="+vwHeight);
			infWin.focus();
		}

	}

	function helpPop(pgNme,tblContent){
		var helpOption = eval("document.forms.newPForm.helpTip"+tblContent+".value");
		// var url = thisSitesUrl + "pop_up_help.asp?pgNm="+pgNme+"&tblContent="+tblContent;
		var url = thisSitesUrl + "pop_up_help.asp?pgNm="+pgNme+"&tblContent="+tblContent+": "+helpOption;
		var vwWidth = 218
		var vwHeight = 200;
		if(pgNme == "Example Form  - Answers"){
			var vwWidth = 550;
			var vwHeight = 550;
			activeWinSize2(vwWidth,vwHeight);
			var vwLeftPos = activeWinLeft;
			var vwTopPos = activeWinTop;
			var explWin = window.open(url,"explWin","width="+vwWidth+",height="+vwHeight+",left="+vwLeftPos+",top="+vwTopPos+",scrollbars=yes")
			explWin.focus();
		}else{
			activeWinSize2(vwWidth,vwHeight);
			var vwLeftPos = activeWinLeft;
			var vwTopPos = activeWinTop;
			var helpWin = window.open(url,"helpWin","top="+vwTopPos+", left="+vwLeftPos+",scrollbars=no,width="+vwWidth+",height="+vwHeight)
			helpWin.focus();
		}

	}

	function infPop1(pgNme,tbNum){
		var url = thisSitesUrl + "pop_ups.asp?pgNm="+pgNme+"&tblNum="+tbNum;
		var vwWidth = 218
		var vwHeight = 450;
		if(pgNme == "Free Offers"){
			var vwWidth = 520;
			var vwHeight = 520;
			activeWinSize2(vwWidth,vwHeight);
			var vwLeftPos = activeWinLeft;
			var vwTopPos = activeWinTop;
			var explWin = window.open(url,"explWin","width="+vwWidth+",height="+vwHeight+",left="+vwLeftPos+",top="+vwTopPos+",scrollbars=yes")
			explWin.focus();
		}else{
			activeWinSize2(vwWidth,vwHeight);
			var vwLeftPos = activeWinLeft;
			var vwTopPos = activeWinTop;
			var infWin = window.open(url,"infWin","scrollbars=yes,width="+vwWidth+",height="+vwHeight+",top="+vwTopPos+",left="+vwLeftPos)
			infWin.focus();
		}

	}
	
	function closeAndGo(winName,whereToGo){

		var url = thisSitesUrl + whereToGo;
		top.opener.location.href = url;
		top.window.close();
	
	}
	
	function showClipping(){
		var vwWidth = 218
		var vwHeight = 220;
		activeWinSize2(vwWidth,vwHeight);
		var vwLeftPos = activeWinLeft;
		var vwTopPos = activeWinTop;
		var url = thisSitesUrl + "/services/web_clipping_service.asp";
		var clipWin = window.open(url,"clipWin","left="+vwLeftPos+",top="+vwTopPos+",scrollbars=no,width="+vwWidth+",height="+vwHeight)
		clipWin.focus();
	}
