function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
        newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
        newWindow.document.open();
        newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
        if (imageType == "swf"){
        newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
        newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
        newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
        newWindow.document.write('</embed></object>');        }else{
        newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">');         }
        newWindow.document.write('</body></html>');
        newWindow.document.close();
        newWindow.focus();
}

function send_email(s)
{
	var name, domen, addr;
	var pos;
		
	pos = s.indexOf("+");
	name = s.substring(0, pos);
	domen = s.substring(pos+1, s.length);

	addr = "mailto:" + name + "@" + "bipom." + domen;

	window.open(addr, "", "", "");
}

function ComposeCartAdd(theForm, mask) {
  var tmp = theForm.base.value;
  if (mask!="") {
  	var si = tmp.indexOf(mask);
  	tmp = tmp.substring(0, si+1) + theForm.Length.value + tmp.substring(si+mask.length);
  }
  var si = tmp.indexOf("-BLK");
  if(si>=0) {
// 	tmp = tmp.substring(0, si+1) + theForm.Color.value + tmp.substring(si+4);
	var cl = theForm.Color.value;
	if (cl!="") cl = "-" + cl;
  	tmp = tmp.substring(0, si) + cl + tmp.substring(si+4);
  }
  tmp += "^" + theForm.price.value + "^" + theForm.Text1.value;

  theForm.cartitadd.value=tmp;
//alert(theForm.cartitadd.value); return false;
  return true;
}

function check_quantity_valid(frm)
{
	var v = frm.elements["quantity"].value;
	if(v.replace(/[\d+]/ig,"").length > 0)
	{
	  alert("Please enter a numeric quantity!");
	  frm.elements["quantity"].focus();
	  return false;
	}
  else {
  	if (v == 0) {
		  alert("Please enter a valid quantity!");
		  frm.elements["quantity"].focus();
  		return false;
  	}else return true;
  }
}
