function imgPop(pajina, daWidth, daHeight, daScroll) {
	// determine screen width and height
	wSize = screen.width;
	hSize = screen.height;
	// page title
	//pageTitle = 'Life Packaging Technology';
	// 
    //pageName = 'intro.html';
	wWindow = daWidth;
 	hWindow = daHeight;
	// offset X (to substract borders) and Y (to substract Windows START bar)
	offSetX = 5;
	offSetY = 30;
	// determine left and top position
	leftWindow = ((wSize - wWindow) / 2) - offSetX;
	topWindow = ((hSize - hWindow) / 2) - offSetY;
	// set some features
	/*fullScreen = 'no';
	menuBar = 'no';
	reSize = 'no';
	scrollBar = daScroll;
	statusBar = 'no';
	titleBar = 'yes';
	toolBar = 'no';*/
	window.open( pajina, "myWindow", "status = 1, height = "+hWindow+", width = "+wWindow+", top = "+topWindow+", left = "+leftWindow+", resizable = 0, scrollbars = "+daScroll)
}

// hide an element
function closeBOX(objID) {
	if (document.getElementById(objID)) {
		 document.getElementById(objID).style.display = "none";
	}
}

// show an element
function openBOX(objID) {
	if (document.getElementById(objID)) {
		 document.getElementById(objID).style.display = "";
	}
}

function rollOver(objID,color) {
	 document.getElementById(objID).style.backgroundColor = color;
}
function rollOut(objID,color) {
	 document.getElementById(objID).style.backgroundColor = color;
}

function daValoare(elm1,elm2) {
	document.getElementById(elm2).value = elm1;
}

function changeClass(elemID,clsName) {
	document.getElementById(elemID).className = clsName;
}

function boxes(pOpen) {
	if(window.crtId == undefined) {
		window.crtId = 1;
	}
	closeBOX('promo_' + window.crtId);
	//openBOX('promo_' + pOpen);
	//Effect.Fade('promo_' + window.crtId, { duration: 0.5 });
	Effect.Appear('promo_' + pOpen, { duration: 0.5 });
		
	window.crtId = pOpen;
}

function closeSelect(objID) {
	if (document.getElementById(objID)) {
		 document.getElementById(objID).style.display = "none";
		 document.getElementById(objID).disabled = true;
	}
}
function showSelect(objID) {
	if (document.getElementById(objID)) {
		 document.getElementById(objID).style.display = "";
		 document.getElementById(objID).disabled = false;
	}
}

/*function boxesFiltre(pPrefix,pOpen) {
	if(window.crtIdChild == undefined) {
		//window.crtIdChild = 1;
		//alert('ii undefined');
	} else {
		//closeBOX('subcat_holder_' + window.crtIdChild);
		document.getElementById(pPrefix + window.crtIdChild).style.display = "none";
		document.getElementById(pPrefix + window.crtIdChild).disabled = true;
	}
	//openBOX(pPrefix + pOpen);
	document.getElementById(pPrefix + pOpen).style.display = "";
	document.getElementById(pPrefix + pOpen).disabled = false;
		
	window.crtIdChild = pOpen;
}*/

///////////////////////////////
function numaNumere2(camp) {
	var aCifre = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
	var valueCamp = ''+document.getElementById(camp).value+'';
	
	for(var i=0; i<aCifre.length; i++) {
		for(var j=0; j<valueCamp.length; j++) {
			if(aCifre.inArray(valueCamp[j])) {
				
			} else {
				crtChar = valueCamp[j];
				valueCamp = valueCamp.replace(crtChar,'');
				document.getElementById(camp).value = valueCamp;	
			}
		}
	}
}

function numaNumere(camp) {
	var aCifre = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".");
	var valueCamp = ''+document.getElementById(camp).value+'';
	
	for(var i=0; i<aCifre.length; i++) {
		for(var j=0; j<valueCamp.length; j++) {
			if(aCifre.inArray(valueCamp[j])) {
				
			} else {
				crtChar = valueCamp[j];
				valueCamp = valueCamp.replace(crtChar,'');
				document.getElementById(camp).value = valueCamp;	
			}
		}
	}
}

Array.prototype.inArray = function (value) {
	// Returns true if the passed value is found in the
	// array. Returns false if it is not.
	var i;
	for (i=0; i < this.length; i++)  {
		if (this[i] == value)  {
			return true;
		}
	}
	return false;
};
////////////////////////////////