<!--
function checkemail() {
	mail = document.send_email.toAddress.value;
	if((mail.indexOf(".") > 2) && (mail.indexOf("@") > 0) == true ) {
		openwin('messagesent','messagesent.html',75,250,"left=200");
		return true;
	} else {
		alert("Invalid email address.");
		return false;
		}
	return false;
}
function clear_textbox(which)
{
if (which == "toName")
	if (document.send_email.toName.value == "Recipient Name")
	document.send_email.toName.value = "";
;
if (which == "toAddress")
	if (document.send_email.toAddress.value == "Recipient Email")
	document.send_email.toAddress.value = "";
;
if (which == "fromName")
	if (document.send_email.fromName.value == "Your Name")
	document.send_email.fromName.value = "";
;
if (which == "fromAddress")
	if (document.send_email.fromAddress.value == "Your Email")
	document.send_email.fromAddress.value = "";
;
if (which == "comments")
	if (document.send_email.comments.value == "Comments")
	document.send_email.comments.value = "";
;
} 
function titleCase(val) {
	var result="";
	words=val.split(' ');
	for (i=0;i<words.length;i++) {
		word=words[i];
		firstletter=new String(word.substring(0,1));
		word=new String(word.substring(1,word.length));
		word=firstletter.toUpperCase()+word.toLowerCase();
		words[i]=word;
		result+=word+" ";
	}
	result=result.substring(0,result.length-1);
	return result;
}
function ucField() {
	document.publish.text.value=titleCase(document.publish.text.value)
}
function lcField() {
	document.publish.text.value=document.publish.text.value.toLowerCase()
}
function openwin(winame,file,height,width,params)  {
	window.open(file,winame,"status=no,scrollbars=yes,resizable=no,toolbar=no,location=no,menu=no,height="+height+",width="+width);
}

function designGroup() {
	window.open('makeimg.php?new_image=<? echo $new_image; ?>&basefilename=<? echo $basefilename; ?>','makeimg');
	window.open('ecat_popup.php','cat_popup');
	window.open('efilelist.php','filelist');
	}

function addressGroup() {
	window.open('address_card.php?new_image=<? echo $new_image; ?>&basefilename=<? echo $basefilename; ?>','makeimg');
	window.open('blank.php','cat_popup');
	window.open('address_info.php','filelist');
	}

function orderGroup() {
	window.open('order.php?new_image=<? echo $new_image; ?>&basefilename=<? echo $basefilename; ?>','makeimg');
	window.open('blank.php','cat_popup');
	window.open('order_info.php','filelist');
	}

 function selectText(what){
 	document.getElementById(what).focus();
 	document.getElementById(what).select();
 }
function errorCheck(nr,v)
{
	if (document.getElementById)
	{
		if (v == "show") {
			document.getElementById(nr+'arrow').style.display = 'block';
			document.getElementById(nr+'tag').style.backgroundColor = 'red';
			document.getElementById(nr+'tag').style.color = 'white';
			document.getElementById(nr+'tag').style.fontWeight = 'bold';
		} else {
			document.getElementById(nr+'arrow').style.display = 'none';
			document.getElementById(nr+'tag').style.backgroundColor = 'white';
			document.getElementById(nr+'tag').style.color = '#660000';
			document.getElementById(nr+'tag').style.fontWeight = 'normal';
		}
	}
	else if (document.all)
	{
		if (v == "show") {
			document.all(nr+'arrow').style.display = 'block';
			document.all(nr+'tag').style.backgroundColor = 'red';
			document.all(nr+'tag').style.color = 'white';
			document.all(nr+'tag').style.fontWeight = 'bold';
		} else {
			document.all(nr+'arrow').style.display = 'none';
			document.all(nr+'tag').style.backgroundColor = 'white';
			document.all(nr+'tag').style.color = '#660000';
			document.all(nr+'tag').style.fontWeight = 'normal';
		}
	}
	else if (document.layers)
	{
		var i = parseInt(nr.substr(nr.length-1,1));
		var replacing = heights[i-1];
		if (shown[i])
		{
			shown[i] = false;
			replacing = -replacing;
			document.layers[nr+'arrow'].style.display = 'block';
			document.layers[nr+'tag'].backgroundColor = 'red';
			document.layers[nr+'tag'].color = 'white';
			document.layers[nr+'tag'].fontWeight = 'bold';
			document.layers[nr+'tag'].top = safe;
		}
		else
		{
			shown[i] = true;
			document.layers[nr+'arrow'].style.display = 'none';
			document.layers[nr+'tag'].backgroundColor = 'white';
			document.layers[nr+'tag'].color = '#660000';
			document.layers[nr+'tag'].fontWeight = 'normal';
			var tempname = 'header' + i;
			document.layers[nr+'tag'].top = document.layers[tempname].top + headerheight;
		}
		for (j=(i+1);j<=max;j++)
		{
			name1 = 'header' + j;
			document.layers[name1].top += replacing;
			if (shown[j])
			{
				name2 = 'number' + j;
				document.layers[name2].top += replacing;
			}
		}
	}
	else alert ('This link does not work in your browser.');
}

function checkFields() {
	missinginfo = "";
	if (document.addressCard.toname.value == "") {
		errorCheck('name','show');
		missinginfo += "\n     -  Name";
	} else {
		errorCheck('name','hide');
	}
	if (document.addressCard.toaddress.value == "") {
		errorCheck('address','show');
		missinginfo += "\n     -  Address";
	} else {
		errorCheck('address','hide');
	}
	if (document.addressCard.tocity.value == "") {
		errorCheck('city','show');
		missinginfo += "\n     -  City";
	} else {
		errorCheck('city','hide');
	}
	if (document.addressCard.tostate.value == "") {
		errorCheck('state','show');
		missinginfo += "\n     -  State";
	} else {
		errorCheck('state','hide');
	}
	if (document.addressCard.tozip.value == "") {
		errorCheck('zip','show');
		missinginfo += "\n     -  Zip";
	} else {
		errorCheck('zip','hide');
	}
	if (missinginfo !== "") {
		return false;
	} else {
		orderGroup();
		return true;
	}
}

function checkccFields() {
	missingccinfo = "";
	if (document.ccverify.FirstName.value == "") {
		errorCheck('ccfirstname','show');
		missingccinfo += "\n     -  FirstName";
	} else {
		errorCheck('ccfirstname','hide');
	}
	if (document.ccverify.LastName.value == "") {
		errorCheck('cclastname','show');
		missingccinfo += "\n     -  LastName";
	} else {
		errorCheck('cclastname','hide');
	}
	if (document.ccverify.Address.value == "") {
		errorCheck('ccaddress','show');
		missingccinfo += "\n     -  Address";
	} else {
		errorCheck('ccaddress','hide');
	}
	if (document.ccverify.City.value == "") {
		errorCheck('cccity','show');
		missingccinfo += "\n     -  City";
	} else {
		errorCheck('cccity','hide');
	}
	if (document.ccverify.State.value == "") {
		errorCheck('ccstate','show');
		missingccinfo += "\n     -  State";
	} else {
		errorCheck('ccstate','hide');
	}
	if (document.ccverify.Zip.value == "") {
		errorCheck('cczip','show');
		missingccinfo += "\n     -  Zip";
	} else {
		errorCheck('cczip','hide');
	}
	if (document.ccverify.CardNum.value == "") {
		errorCheck('cccardnumber','show');
		missingccinfo += "\n     -  ccNum";
	} else {
		errorCheck('cccardnumber','hide');
	}
	if (missingccinfo !== "") {
		return false;
	} else {
		return true;
	}
}

function checkCode(code) {
	code = window.document.promo.promocode.value;
	if (code == "evil01") {
		window.document.ccverify.EvilPrice.value="$1.95";
		window.document.ccverify.Cost.value="$1.95";
	} else if (code == "evil02") {
		window.document.ccverify.EvilPrice.value="$2.95";
		window.document.ccverify.Cost.value="$2.95";
	} else if (code == "dollar") {
		window.document.ccverify.EvilPrice.value="$3.95";
		window.document.ccverify.Cost.value="$3.95";
	} else {
		window.document.ccverify.EvilPrice.value="$4.95";
		window.document.ccverify.Cost.value="$4.95";
		}
	return false;
	}

function show(e) { 
	x = e.offsetX; 
	y = e.offsetY;
}

function horiz() {
	var x = event.offsetX
	if (x > 9) { 
		countUp()
	} else { 
		countDown()
	}
}

function vert() {
	var x = event.offsetY
	if (x < 9) { 
		vCountDown()
	} else { 
		vCountUp()
	}
}

function angle() {
	var x = event.offsetX
	if (x < 9) { 
		aCountUp()
	} else { 
		aCountDown()
	}
}

<!--
var detect = navigator.userAgent.toLowerCase();
var OS,browser,total,thestring;
var version = 0;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
// -->
function castShadow() {
var is_checked = window.document.editImage.text_shadow.checked;
	if (browser = "Safari") {
		if (is_checked == true) {
		  window.open('make.php?text_shadow=1','makeimg');
		} else {
		  window.open('make.php?text_shadow=0','makeimg');
		}
	}
	if (browser = "Internet Explorer") {
		if (is_checked == true) {
		  window.open('make.php?text_shadow=0','makeimg');
		} else {
		  window.open('make.php?text_shadow=1','makeimg');
		}
	}
	if (browser != "Internet Explorer") {
		if (is_checked == true) {
		  window.open('make.php?text_shadow=0','makeimg');
		} else {
		  window.open('make.php?text_shadow=1','makeimg');
		}
	}
}
<!-- 
function reload(which)
{
if (which == "text")
	document.editImage.submit();
;
} 
function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}
function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}
function deleteCookie(name, path, domain)
{
    if (getCookie(name))
    {
        document.cookie = name + "=" + 
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}
function pagecount() {
	cookieName='evilheadlinespagecounter';
	counter = getCookie(cookieName);
	counter = Number(counter);
	if (!counter) {
		setCookie(cookieName,1);
	}
	setCookie(cookieName,(counter + 1));
}
function setup() {
	pagecount();
	cookieName = 'evilheadlinespagecounter';
	set=getCookie(cookieName);
	if(!set) { set=""; }
}
-->
//-->
