// JavaScript Document

Accordian = Class.create();
Accordian.prototype = {
	initialize: function(elem, clickableEntity) {
		this.container = $(elem);
		var headers = $$('#' + elem + ' .section ' + clickableEntity);
		headers.each(function(header) {
			Event.observe(header,'click',this.sectionClicked.bindAsEventListener(this));
		}.bind(this));

	},

	sectionClicked: function(event) {
		this.openSection(Event.element(event).parentNode);
	},

	openSection: function(section) {
		var section = $(section);
		if(section.id != this.currentSection) {
			this.closeExistingSection();
			this.currentSection = section.id;
			var p_head = $(section.id).immediateDescendants();
			$(p_head[0]).setStyle({'background': 'url(images/newsbar.jpg) no-repeat top right', 'color': '#3c3c3c'});
			var contents = document.getElementsByClassName('contents',section);
			contents[0].show();
		}
	},

	closeExistingSection: function() {
		if(this.currentSection) {
			var p_head = $(this.currentSection).immediateDescendants();
			$(p_head[0]).setStyle({'background': 'url(images/newsbar.jpg) no-repeat top right', 'color': '#3c3c3c'});
			var contents = document.getElementsByClassName('contents',this.currentSection);
			contents[0].hide();
		}
	}
} // end Accordian


<!--
function g_content(t, c) {
	document.getElementById("g_title").innerHTML = t;
	document.getElementById("g_desc").innerHTML = c;
	return false;
}

Event.observe(window,"load",init,false);
function init() {
	accordian = new Accordian("newsBar","p.n_head");
	accordian.openSection("S_Nav10");
}

//-->


function chk_sameWithBilling(){
	if(document.frmbilling.chk_ship.checked) {
		document.frmbilling.txtfname_ship.value = document.frmbilling.txtfname.value;
		document.frmbilling.txtlname_ship.value = document.frmbilling.txtlname.value;
		document.frmbilling.txtphone_ship.value = document.frmbilling.txtphone.value;
		document.frmbilling.txtext_ship.value = document.frmbilling.txtext.value;
		document.frmbilling.selcountry_ship.value = document.frmbilling.selcountry.value;
		document.frmbilling.txtadd1_ship.value = document.frmbilling.txtadd1.value;
		document.frmbilling.txtadd2_ship.value = document.frmbilling.txtadd2.value;
		document.frmbilling.txtcity_ship.value = document.frmbilling.txtcity.value;
		document.frmbilling.txtstate_ship.value = document.frmbilling.txtstate.value;
		document.frmbilling.txtzip_ship.value = document.frmbilling.txtzip.value;

	}else if(document.frmbilling.chk_ship.checked == false) {
		document.frmbilling.txtfname_ship.value = "";
		document.frmbilling.txtlname_ship.value = "";
		document.frmbilling.txtphone_ship.value = "";
		document.frmbilling.txtext_ship.value = "";
		document.frmbilling.selcountry_ship.value = "--";
		document.frmbilling.txtadd1_ship.value = "";
		document.frmbilling.txtadd2_ship.value = "";
		document.frmbilling.txtcity_ship.value = "";
		document.frmbilling.txtstate_ship.value = "";
		document.frmbilling.txtzip_ship.value = "";
	}
	
	

} 
