
function moq(a,b)
	{if (a > b) {
    alert('Please input Qty. equal to or greater than the Min. Order Qty : ' + a);
	return false;}
	else {
	return true;}
	}
function nonZCheck(q)
	{if (q<=0)
		{ alert('This is a non-zero field');
		return false;}
	else {return true;}
	}
function CA(f)
	{for (var i =0; i < f.length; i++)
		{var e=f.elements[i];
		if (e.type=='checkbox' & e.name=='sku')
		{f.elements[i].checked=f.AC.checked;}
		}
	}
function skucheck(f)
	{for (var i =0; i < f.length; i++)
		{var e=f.elements[i];
		if (e.name=='sku' & e.type=='checkbox' & e.checked==true)
		{return true;}
		}
		alert('Please check at least 1 item');
		return false;
	}
function autocheck(f,a)
	{for (var i =0; i < f.length; i++)
		{var e=f.elements[i];
		if (e.type=='checkbox' & e.name==('proxy_enabled_' + a) & e.value=='a')
		{f.elements[i].checked=1;}
		}
	}
function chkdigit(f) {
		if (isNaN(f.SBidprice.value) || (f.SBidprice.value==""))
		{
			alert (f.SBidprice.value + ' is not a number\nPlease enter a numerical vale\nfor the field: Bid Price');
			return false; 
		}
		else if (isNaN(f.Sqty.value) || (f.Sqty.value==""))
		{
			alert (f.Sqty.value + ' is not a number\nPlease enter a numerical vale\nfor the field: Quantity');
			return false; 
		}
		else {
		return true;
		}
	}

function StdOpenWin(url) {
	t=screen.height-145;
	l=screen.width-10;
	features='menubar=yes,location= yes,status=yes,toolbar=yes,resizable=yes,scrollbars=yes,width=' + l + ',height=' + t + ',left=0,top=0';
	window.open(url,'PopWin',features);
	}

function ImgOpenWin(url) {
	t=parseInt((screen.height-350)/2);
	l=parseInt((screen.width-300)/2);
	features='toolbar=no,resizable=yes,scrollbars=yes,width=300,height=350,left=' + l + ',top=' + t;
	window.open(url,'PopWin',features)
	}

function ImgOpenWin2(url) {
	t=parseInt((screen.height-350)/2);
	l=parseInt((screen.width-300)/2);
	features='toolbar=no,resizable=yes,scrollbars=yes,width=300,height=350,left=' + l + ',top=' + t;
	window.open(url,'Popwin6',features)
	}

function CompOpenWin(url) {
//	t=(screen.height-600)/2;
//	l=(screen.width-800)/2;
	t=parseInt(screen.height-20);
	l=parseInt(screen.width-10);
//	features='menubar=yes,title=yes,location= yes,toolbar=yes,status=yes,resizable=yes,scrollbars=yes,left=' + l + ',top=' + t + ',width=800,height=600';
//  	features='toolbar=no,resizable=yes,scrollbars=yes,width=800,height=600,left=' + l + ',top=' + t;
	features='toolbar=no,resizable=yes,scrollbars=yes,left=0, top=0,width=' + l + ',height=' + t;
	window.open(url,'PopWin',features)
	}

function pagesubmit(k){

	document.pages.SN.value = k;
	//alert(document.pages.SN.value);
	document.pages.submit();
}

function BasketOpenWin(url) {
	t=(screen.height-225);
	l=(screen.width-210);
	x=Math.random();
	x=Math.floor(x*1000+1);
	features='menubar=no,title=no,location= no,toolbar=no,resizable=yes,scrollbars=yes,width=' + l + ',height=' + t + ',left=50,right=50';
	window.open(url,'basketwindow',features)
}

function BasketAddOpenWin(url) {
	t=(screen.height-200)/2;
	l=(screen.width-300)/2;
	x=Math.random();
	x=Math.floor(x*1000+1);
	features='menubar=no,title=no,location= no,toolbar=no,resizable=yes,scrollbars=yes,left=' + l + ',top=' + t + ',width=780,height=550';
	window.open(url,'basketwindow',features)
}