/*
 * Front end for simple e-mail contact system that doesn't expose e-mail addresses to spam bots.
 * Version 1 Copyright (C) Paul Cory 2003.
 * Distributed under the BSD License.
 */

/*
* Configuration variables. Alter here or on a page-by-page basis
*/

var url ="http://schools.wcpss.net/cgi-bin/contact/contact.cgi";

var styles = '';

function contactForm (name,contactid) {
	
	var fullURL = url+'?'+'name='+name+'&'+'contactid='+contactid;
	
	if (styles) fullURL = fullURL+'&'+'styles='+styles;
	var contacWin=open(fullURL,"contactWindow","width=500,height=400,toolbar=no,resizable=no,scrollbars,locationbar=no");


}

function write_link (name,contactid) {

	var email = " ";
	
	if (arguments[2] == 0 ) email = "";
	
	document.write(" <a href=\"javascript:contactForm('"+name+"','"+contactid+"')\">" +email+name+"</a> " );

}


/*
* To use, first import the above script.
* <script language="javascript" src="/javascript/contact-form.js"></script> above where you plan to use it.
*
* Now, call it wherever you want an contact form link thusly
* <script language="javascript">write_link('name','contactid')</script>
* Where name is the person's real name, and contactid is the part of their e-mail address before the @ - eg, fred@doh.org would have a contact id of fred
*/

