var t;
var src;
var ver=0,pe=0.1,e;
var glng='lv';

function e_ov(e){
ev=e || window.event;
t=ev.srcElement || ev.target;
//t=window.event.srcElement || evt.target;
}
function DoOver2(e){
ev=e || window.event;
evt=ev.srcElement || ev.target;
evt.style.backgroundColor="red";
}


function Ov(e){
	ev=e || window.event;
	evt=ev.srcElement || ev.target;
//	if(pe && (pe !=evt))
	{
		evt.style.color="red";
		evt.style.backgroundColor="springgreen";
	}
}
function e_on(a1,a2,a3,a4){ 
msg="";
if(a3==1){
obj=document.getElementsByName("ck");
tb=document.getElementById("tbl");
for(i=0; i<obj.length; i++){
if(obj[i].checked){
row = obj[i].parentNode.parentNode.rowIndex ;
msg+=tb.rows[row].cells[0].innerHTML;
msg+= ";";
}
}
var strPar="new="+msg;
src="exp/show_cart";
getVote("exp/show_cart",strPar, "container");
}
if(t.className=="ns1"){
t.innerHTML=a1;
t.className ="ns2";
}else if(t.className=="ns2"){
t.innerHTML=a2;
t.className="ns1";
}
/*	function t.onmouseup()
	{
		if(a4)
		{
			t.innerText=a2;
			t.className ="ns1";
		}
	}*/
}

function ce(){
if(t.className=="ns1"){
document.getElementById("cont").contentEditable=false;
}else if(t.className=="ns2"){
document.getElementById("cont").contentEditable=true;}
}

function sendLog2(){
var msg = createQuery();
var strPar="save=true&"+msg;
src="exp/show_cart";
getVote("exp/show_cart",strPar, "container");
}
function createQuery(){
    var elements = document.getElementById("form2").elements;
    var pairs = new Array();

    for (var i = 0; i < elements.length; i++){
//        if ((name = elements[i].name) && (value = elements[i].value))
//            pairs.push(name + "=" + encodeURIComponent(value));
	value = elements[i].value;	
	if (!value){value = 0;}
	name = elements[i].name;
        pairs.push(name + "=" + encodeURIComponent(value));
    }
    var txt = pairs.join("&");
    return txt;
}

function sendLog3(){
src="exp/checkout";
getVote("exp/checkout","", "container");
}
function sendLog33(){
src="exp/process";
getVote("exp/process","", "container");
}

function sendLog10(){
var tt = document.getElementById("fiz");
if(tt.className=="ns1"){
fizu = "new=1";
}else {
fizu = "new=2";
}src="exp/checkout";
getVote("exp/checkout",fizu, "container");
}

function sendLog15(){
src="exp/show_cart";
getVote("exp/show_cart","", "container");
}

function sendLog20(){
//alert("ggg");
var strName=document.frm5.name.value;
var strAddress=document.frm5.address.value;
var strCity=document.frm5.city.value;
var strZip=document.frm5.zip.value;
var strCountry=document.frm5.country.value;

var strPar="name="+strName+"&address="+strAddress+"&city="+strCity+"&zip="+strZip+"&country="+strCountry;
src="exp/purchase";
getVote("exp/purchase",strPar, "container");
}

function fiz(){
var sName=document.frmf.name.value;
var sPcode=document.frmf.pcode.value;
var sEmail=document.frmf.email.value;
var sAddress=document.frmf.address.value;
var sTel=document.frmf.tel.value;
var sFax=document.frmf.fax.value;
var sCom=document.frmf.comment.value;
var strPar="name="+sName+"&pcode="+sPcode+"&email="+sEmail+"&address="+sAddress+ "&tel="+sTel+"&fax="+sFax+"&comment="+sCom;
src="exp/purchase";
getVote("exp/purchase",strPar, "container",1);
}

function jur(){
var sFirm=document.frmf.firma.value;
var sTel=document.frmf.tel.value;
var sFax=document.frmf.fax.value;
var sAddr=document.frmf.address.value;
var sJura=document.frmf.juraddr.value;
var sRegnom=document.frmf.regnom.value;
var sName=document.frmf.name.value;
var sEmail=document.frmf.email.value;
var sCom=document.frmf.comment.value;
var strPar="firma="+sFirm+"&tel="+sTel+"&fax="+sFax+"&address="+sAddr+"&juraddr="+sJura+"&regnom="+sRegnom+"&name="+sName+"&email="+sEmail+"&comment="+sCom;
src="exp/purchase";
getVote("exp/purchase",strPar, "container",1);
}

function sel(el){
for(var i=0;i<el.options.length;i++){
if(el.options[i].selected){
strPar="val="+el.options[i].value;
getVote(src,strPar, "container");
}}}

function lng(ln){glng=ln;}
function rek(){window.open("../exp/rekins_"+glng+".php",null,"height=700,width=750,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
}

