<!--
var material = new Array(.34, .28, .42, .34);
var basenum = new Array(300,275);
var tagID = new Array("TAG1","","TAG2");
function calculate() {
	var mater = document.tagdesigner.material;
	var tagsz = document.tagdesigner.tagsize;
	var cutie = document.tagdesigner.qty.value;
	var price = document.getElementById("subtotal");
	for (i=0;i<mater.length;i++) {
		if (mater[i].checked == true) {
			for (e=0;e<tagsz.length;e++) {
				if (tagsz[e].checked == true) {
					if (cutie != "") {
						tmprc = (basenum[mater[i].value]+(material[(parseInt(mater[i].value)+parseInt(tagsz[e].value))]*cutie)).toFixed(2);
						price.style.color = "#000";
						price.style.fontSize = "13px";
						price.style.fontWeight = "bold";
						price.value = "$"+tmprc;
					}
				}
			}
		}
	}
}
function isNumberKey(evt) {
	if (evt) {
		var charCode = (evt.which) ? evt.which : evt.keyCode
		if (charCode > 31 && (charCode < 48 || charCode > 57))
			return false;

			return true;
	}
}
var W3CDOM = (document.createElement && document.getElementsByTagName);

function initFileUploads() {
	if (!W3CDOM) return;
	var fakeFileUpload = document.createElement('div');
	fakeFileUpload.className = 'newinput';
	fakeFileUpload.appendChild(document.createElement('input'));
	var x = document.getElementsByTagName('input');
	for (var i=0;i<x.length;i++) {
		if (x[i].type != 'file') continue;
		if (x[i].parentNode.className != 'attach') continue;
		var clone = fakeFileUpload.cloneNode(true);
		x[i].parentNode.appendChild(clone);
		x[i].relatedElement = clone.getElementsByTagName('input')[0];
		x[i].onchange = x[i].onmouseout = function () {
			this.relatedElement.value = this.value;
		}
	}
}
function FindPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		}
	while (obj = obj.offsetParent);
		var objPos = new Object();
		objPos.x = curleft;
		objPos.y = curtop;
		return objPos;
	}
}
function correctPNG() {
	for(var i=0; i<document.images.length; i++) {
		var img = document.images[i]
		var imgName = img.src.toUpperCase()
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
			var imgID = (img.id) ? "id='" + img.id + "' " : ""
			var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			var imgStyle = "display:inline-block;" + img.style.cssText 
			if (img.align == "left") imgStyle = "float:left;" + imgStyle
			if (img.align == "right") imgStyle = "float:right;" + imgStyle
	 		if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
	 		var strNewHTML = "<span " + imgID + imgClass + imgTitle
	 		+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
			img.outerHTML = strNewHTML
			i = i-1
		}
	}
}
function showHide(layerName){
	if (document.getElementById){
		var fred = document.getElementById(layerName);
		var display = fred.style.display ? '' : 'none';
		fred.style.display = display;
		return;
	}
}
function AddListener(obj, type, expression, bubbling) {
	bubbling = bubbling || false;
	element = document.getElementById(obj);
	if (window.addEventListener) { // Standard
		element.addEventListener(type, expression, bubbling);
		return true;
	} else if (window.attachEvent) { // IE
		element.attachEvent('on' + type, expression);
		return true;
	} else return false;
}
function openChatWindow() {
	window.open('http://server.iad.liveperson.net/hc/48343607/?cmd=file&amp;file=visitorWantsToChat&amp;site=48343607&amp;imageUrl=http://images.liveperson.com/lp/48343607&amp;referrer='+escape(document.location),'chat48343607','width=472,height=320');
	return false;
}

addDOMLoadEvent = (function(){
	var load_events = [],
        load_timer,
        script,
        done,
        exec,
        old_onload,
        init = function () {
            done = true;
			clearInterval(load_timer);
            while (exec = load_events.shift())
                exec();
            if (script) script.onreadystatechange = '';
        };
    return function (func) {
        if (done) return func();
        if (!load_events[0]) {
            if (document.addEventListener)
                document.addEventListener("DOMContentLoaded", init, false);
            /*@cc_on @*/
            /*@if (@_win32)
                document.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");
                script = document.getElementById("__ie_onload");
                script.onreadystatechange = function() {
                    if (this.readyState == "complete")
                        init(); // call the onload handler
                };
            /*@end @*/
            if (/WebKit/i.test(navigator.userAgent)) { // sniff
                load_timer = setInterval(function() {
                    if (/loaded|complete/.test(document.readyState))
                        init();
                }, 10);
            }
            old_onload = window.onload;
            window.onload = function() {
                init();
                if (old_onload) old_onload();
            };
        }
        load_events.push(func);
    }
})();

addDOMLoadEvent(function() {
	//add stuff here
	if (document.getElementById("logoPanel")) { initFileUploads(); }
	if (document.getElementById("ChatButton")) { AddListener("ChatButton","click",openChatWindow,true); }
	if (!window.XMLHttpRequest) { correctPNG(); }
});

//-->