<!--
xx = 0;
function setSameAddres(){
	form = document.forms[0];
	e = form.elements;
	xx++;
	if (xx == 1){
		for (var c=10; c<18; c++){
			e[c].value = "same as shipping address"
			e[c].notrequire = true;
			e[c].disabled = true;
			set(e[c], "#F9E499");
		}
	} else {
		for (var c=10; c<18; c++){
			e[c].value = ""
			e[c].notrequire = false;
			e[c].disabled = false;
			unset(e[c]);
		}
		xx = 0;
	}
}
function set(e,bgColor){
	color = (bgColor)? bgColor : "#FF9900"
	e.style.background = color;
}
function unset(e){
	e.style.background = "#FFFFFF";
}
function makeReset(){
	form = document.forms[0];
	e = form.elements;
	form.elements['checkbox'].checked = false;
	for (var c=10; c<18; c++){
			e[c].value = ""
			e[c].notrequire = false;
			e[c].disabled = false;
			unset(e[c]);
		}
		xx = 0;
}
function validate(){
	ra = new Array();
	canSend = true;
	ra[0]= /[.+]/;  
	form = document.forms[0];
	e = form.elements;
		// NES   
//		form.action="https://www.evaysflowers.com/index.php?view=send";
		form.action="/index.php?view=send";
	for (c=0; c<e.length; c++){
			if (e[c].value == "" || e[c].value == "none"){
				if (!e[c].notrequire){
					set(e[c]);
					canSend = false;
				}
			} else {
				if (!e[c].notrequire){
					unset(e[c]);
				}
			}
	}
	if (canSend){
		//alert ("ALL OK CAN SUBMIT FORM") 
		form.submit();
	} else {
		alert ("Your order cannot be processed\n Fill out all fields marked with asterix (*)")
	}
}
function changeAmount(id,f){
	e = window.document.forms[f].elements[0];
	hrefs = "index.php?view=add&id=" + id + "&count=" + e.value;
	window.location.href = hrefs;
}
function goBack(){
	form = document.forms[0];
	form.action = "index.php?view=check";
	form.submit();
}
function fSubmit(){
	form = document.forms[0];
	form.action = "index.php?view=doord";
	form.submit();
}
function okno(w,h,pic)
{
	w = (!w) ? 450 : w+10;
	h = (!h) ? 400 : h+25;
	title = pic.split(".");
	ekranw=screen.availWidth; 	
	ekranh=screen.availHeight;
	x=(ekranw/2)-(w/2);	
	y=(ekranh/2)-(h/2);
	imie='blah';	
	at='width='+w+' height='+h+' scrollbars=0 menubar=0 resizeable=0 status=0 toolbar=0,fullscreen=0';
	nazwa = "zoom.php?view=" + pic + "&title=" + title[0];
	win=window.open(nazwa,imie,at);
	win.resizeTo(w,h);
	win.moveTo(x,y); 
	win.focus();
}
NowUp = new Array();
function showSub(id){
	caller = eval("document.all." + id);
	subD = id.substr(3,id.length);
	name = "sub" + subD;
	subcat = eval("document.all." + name);
	window.NowUp[window.NowUp.length] = subcat;
	if (typeof(subcat) == "object") {
		subcat.style.visibility = "" ;
		subcat.style.top = caller.offsetTop - 3;
		subcat.style.left = caller.offsetLeft+caller.clientWidth-75;
	}
}
function hideSub(id){
	if( window.event.toElement.id.indexOf("sub") == -1 ){
		GR_hideSub(id);
	}
}
function GR_hideSub(id){
	caller = eval("document.all." + id);
	subD = id.substr(3,id.length);
	name = "sub" + subD;
	subcat = eval("document.all." + name);
	if (typeof(subcat) == "object") {
		subcat.style.visibility = "hidden" ;
		subcat.style.top = -5000;
		subcat.style.left = -5000;
	}
}

//-->
