

function SignupContinue()
{
	var btn;
	var btn=document.getElementById('Contents_btProceed');
	btn.click();
}

function SendSignup()
{
	var btn;
	var btn=document.getElementById('Contents_btSend');
	btn.click();
}

function CopyAddressOrder()
{
	var btn;
	var btn=document.getElementById('Contents_btnCopyAddress');
	btn.click();
}

function PayOrder(btnName)
{
	var btn;
	
	var btn=document.getElementById('Contents_' + btnName);
	btn.click();
}

function PayResultFailed()
{
	var btn;
	var btn=document.getElementById('Contents_btBack');
	btn.click();
}

function PayResultOK()
{
	var btn;
	var btn=document.getElementById('Contents_btnHome');
	btn.click();
}

function CancelOrder()
{
	var btn;
	var btn=document.getElementById('Contents_btCancelOrder');
	btn.click();
}

function SaveOrder()
{
	var btn;
	var btn=document.getElementById('Contents_btnSaveOrder');
	
	btn.click();
}

function ConfirmCancelOrder(confirm)
{
	var btn;
	if (confirm=='yes')
	{
		btn=document.getElementById('Contents_btYes');
	}
	else
	{
		btn=document.getElementById('Contents_btNo');
	}
	btn.click();
}

function clearshoprow(artcode)
{
	var btn=document.getElementById('Shopping_btnClearRow_' + artcode);
	btn.click();
}

function DisplayClearCartRow()
{
	var row=document.getElementById('rowClearCart')
	row.style.display='';
}

function HideClearCartRow()
{
	var row=document.getElementById('rowClearCart')
	row.style.display='none';
}

function QuickOrder(e)
{
	var btn=document.getElementById('Quickorder_btnQuickOrder');
	
	if (e==null) { 
		btn.click();
		return;
		
	}
	
	if (e.keyCode==13){
		e.returnValue=false;
		e.cancel = true;
		btn.click();
	
	}
}



function SearchArticles(e)
{	
	
	var search;
	//fires also on mouseclick
	if (e==null) { 
		search=document.getElementById('Header_search_txtSearch').value
		search=search.replace(/&/g, '_amp_');
		search=htmlEncode(search,false);
		//document.location='index.aspx?a=4&searchText=' + document.getElementById('Header_search_txtSearch').value;
		document.location='index.aspx?a=4&searchText=' + search;
		return;
	}
	
	//keycode 13=enter
	if (e.keyCode==13){
		search=document.getElementById('Header_search_txtSearch').value
		search=search.replace(/&/g, '_amp_');
		search=htmlEncode(search,false);
		
		
		e.returnValue=false;
		e.cancel = true;
		//document.location='index.aspx?a=4&searchText=' + document.getElementById('Header_search_txtSearch').value;
		document.location='index.aspx?a=4&searchText=' + search;
	}
	
	
	
	//fires also on mouseclick
	//if (e.keyCode==0){
		//document.location='index.aspx?a=4&searchText=' + document.getElementById('Header_search_txtSearch').value;
		
	//}
}

function setsize()
{
	if (document.body.clientWidth-341>0){
		document.getElementById('cellMiddle').style.width=document.body.clientWidth-341;
	}
	
	if (document.body.clientWidth-797>0){
		document.getElementById('cellHeaderMiddle').style.width=document.body.clientWidth-797;
	}
	var ifra;
	
	//fraabout
	ifra=document.getElementById('Contents_fraabout');
    if (ifra!=null)
    {
		
		//ifra.style.height=document.body.clientHeight-50;	
		var h = ifra.contentWindow.document.body.scrollHeight;
		 document.getElementById('Contents_fraabout').style.height = h;

    }
	//frahelp
	ifra=document.getElementById('Contents_frahelp');
    if (ifra!=null)
    {
		
		//ifra.style.height=document.body.clientHeight-50;	
		var h = ifra.contentWindow.document.body.scrollHeight;
		 document.getElementById('Contents_frahelp').style.height = h;

    }
    //fracustom
    ifra=document.getElementById('Contents_fraCustom');
    if (ifra!=null)
    {
		
		//ifra.style.height=document.body.clientHeight-50;	
		var h = ifra.contentWindow.document.body.scrollHeight;
		 document.getElementById('Contents_fraCustom').style.height = h;

    }
	
}
function ConfirmClearcart()
{
	var btn=document.getElementById('Shopping_btnConfirmClear');
	btn.click();
}

function SaveCart()
{
	var btn=document.getElementById('Shopping_btnSave');
	btn.click();

}


function Logout()
{
	//var btn=document.getElementById('btnLogout');
	//btn.click();
	document.location='index.aspx?a=1&logout=true';
	
}



function Login()
{
	var btn=document.getElementById('Login_btnLogin');
	btn.click();
}




function TryLogin(e)
{
	var btn=document.getElementById('Login_btnLogin');
	
	if (e.keyCode==13){
		 e.returnValue=false;
		 e.cancel = true;
		
		btn.click();
	
	}
	
	/*if (event.keyCode==13){
		
		event.keyCode=0;
		btn.click();
	
	} */
}

function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

if (document.images) {
home = newImage("images/nhomeh.gif");
map = newImage("images/nmaph.gif");
contacts = newImage("images/ncontactsh.gif");
disclaimer=newImage("images/ndisclaimerh.gif");
}

function sh(where) {
if (document.images) {
stored=where;
document.images[where].src="images/n"+where+"h.gif";
}
}

function hd() {
if (document.images) {
where=stored;
document.images[where].src="images/n"+where+".gif";
}
}

function openPic(url,width,height)
{
	window.open(url,'Info2','width=' + width + ',height=' + height + ',status=no,toolbar=no,menubar=no,links=no,location=no,resizable=yes,scrollbars=auto');
}


