var ajax;
var __sto=100000;
var __bto=__sto;
var __helpR=false;
var __lto=__sto;
var __ows,__xo,__yo,__mf=false;
function $(a){return document.getElementById(a);}
function __foc(a){var e=$(a);try{e.focus();e.select();}catch(e){}}
function __nsub(f,a){
	__sto=__bto;
	var f=document.forms[f];
	f.submit();
	return false;
}
function __sub(f,a){
	__sto=__bto;
	var f=document.forms[f];
	if(f){
		var p=f.action;
		v=f['vact'];
		if(v){
			v.value=a;
		}
		var sf=Form.serialize(f);
		$('content').innerHTML = $('progress').innerHTML;
		new Ajax.Updater('content', p, 
		{method:'post', evalScripts:true, postBody:sf, 
		requestHeaders:{'If-Modified-Since':'Sat, 1 Jan 2000 00:00:00 GMT'}});
	}
	return false;
}
__osub=__sub;
function __cto(){
	var mto;
	var txt;
	__sto--;
	txt=$('loginto');
	if(__sto==0){
		window.location.replace("../main/timeout.action");
	} else if (__sto>60){
		mto = Math.round(__sto / 60);
		if (__lto != mto) {
			__lto = mto;
			if(txt){
				txt.innerHTML='Logout in ' + mto + " min.";
			}
		}
	} else {
		if(txt){
			txt.innerHTML='Logout in ' + __sto + " sec.";
		}
	}
}
if(__sto>0){window.setInterval(__cto,1000);}
function __okp(ev) {
	ev=(ev?ev:window.event);
	var ret=true;
	var kc=ev.keyCode;
	if(kc==13){
		//alert(__src(ev).form.id);
		if(__src(ev).type!="textarea"){
			ret=__sub(0, "change");
		}
	}
	else if(kc==27){
		var c=$("cncl");
		if(c){
			window.location.assign(c.href);
			ret=false;
		}
	}
	else if(ev.altKey){
		ret=__ak("alt",kc);
	}
	else if(ev.ctrlKey){
		ret=__ak("ctrl",kc);
	}
	return ret;
}
function __ak(t,k){
	if((k!=17)&&(k!=18)){
		var c=$((t+"_"+String.fromCharCode(k)).toLowerCase());
		if(c){
			window.location.assign(c.href);
			return false;
		}
	}
	return true;
}
function __src(e){
	return(e.srcElement?e.srcElement:e.target);
}
function confirmLink(m,a){
	if(confirm(m)){
		window.location.assign(a);
	}
}
function __ds(ad,aa,af,as) {
	ajax=new Ajax.Updater(ad, aa, 
		{asynchronous:true, postBody:Form.serialize(af), onComplete:as});
	$(ad).innerHTML = $('progress').innerHTML; 
	return false;
}
function __help(an) {
	var d='helpMsg';
	if (!__helpR) {
		ajax=new Ajax.Updater(d, '../nlb/helpPage.action', 
			{asynchronous:true, postBody:'page=' + an});
		$(d).innerHTML = $('progress').innerHTML;
		__helpR=true;
	}
	new Effect.Appear($(d));
	return false;
}
function $(a){return document.getElementById(a);}
function __omd(ev) {
    ev=(ev?ev:window.event);
    var e=$("modaldlg").style;
    __xo=ev.clientX-parseInt(e.left);
    __yo=ev.clientY-parseInt(e.top);
    __mf=true;
    return false;
}
function __omm(ev) {
    ev=(ev?ev:window.event);
    if(__mf){
    __move($("modaldlg"),ev.clientX-__xo,ev.clientY-__yo);
    return false;
    }
    return true;
}
function __omu(ev) {
    if(__mf){
    __mf=false;
    return false;
    }
    return true;
}
function __move(e,x,y){
    e.style.left=x+"px";
    e.style.top=y+"px";
    return e;
}
function __size(e,x,y){
    if(x)e.style.width=x+"px";
    if(y)e.style.height=y+"px";
    return e;
}
function __show(a,b,l,t,w,h){
    var n=$("modaldlg");
    var e=$("modalback");
    $("modaltitle").innerHTML=a;
    $("modalcontent").innerHTML=b;
    document.body.scroll="no";
    __move(n,l,t);
    __size(n,w,h);
    e.style.width="1000px";
    e.style.height="1000px";
    __move(e,0,0);
    e.style.display="block";
    e.focus();
    return false;
}
function __close(){
    $("modaldlg").style.display="none";
    $("modalback").style.display="none";
    document.body.scroll="auto";
    return false;
}
function loadModal(p) {
	__sto=__bto;
    document.body.scroll="no";
    $("modalback").style.display='block';
	new Ajax.Updater('modalcontent', p, 
		{method:'get', evalScripts:true, requestHeaders:{'If-Modified-Since':'Sat, 1 Jan 2000 00:00:00 GMT'}});
    $("modaldlg").style.display='block';
	return false;
}
function loadNonModal(p) {
	__sto=__bto;
	$('modalcontent').innerHTML = $('progress').innerHTML;
	new Ajax.Updater('modalcontent', p, 
		{method:'get', evalScripts:true, requestHeaders:{'If-Modified-Since':'Sat, 1 Jan 2000 00:00:00 GMT'}});
    $("modaldlg").style.display='block';
	return false;
}
function loadPage(p) {
	__sto=__bto;
	__sub=__osub;
	$('content').innerHTML = $('progress').innerHTML;
	new Ajax.Updater('content', p, 
		{method:'get', evalScripts:true, requestHeaders:{'If-Modified-Since':'Sat, 1 Jan 2000 00:00:00 GMT'}});
	return false;
}
function toggleVis(a,es) {
	var s=$(es).style;
	if (s.display=='none') {
		a.className="contractlink";
		s.display='block';
	} else {
		a.className="expandlink";
		s.display='none';
	}
	a.blur();
}
var Invoice={
	
}
var LineItem={
	sku:0,
	taxable:false,
	amount:0.00
}
