function insertFlash(sClassId, sVersion, sName, sWidth, sHeight, sTitle) {
	document.write('<object classid="clsid:'+sClassId+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+sVersion+'" width="'+sWidth+'" height="'+sHeight+'" title="'+sTitle+'">');
	document.write('<param name="movie" value="'+sName+'">');
	document.write('<param name="quality" value="high">');
	document.write('<embed src="'+sName+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+sWidth+'" height="'+sHeight+'">');
	document.write('</embed>');
	document.write('</object>');
  }
function showTr(sName){
	document.getElementById(sName).style.display = '';
}
function hideTr(sName){
	document.getElementById(sName).style.display = 'none';
}
function hideNonSelectedTr(iNumTr, iThisTr){
	i=0;
	while(i<iNumTr){
		if(i != iThisTr){
			document.getElementById(i).style.display = 'none';
		}
	++i;
	}
}
function switchTr(sTrToShow, sTrToHidde){
	//TR to show
	document.getElementById(sTrToShow).style.display = '';
	document.getElementById(sTrToHidde).style.display = 'none';
}
function writeCadreValue(sCadreValue){
	document.getElementById('cadre_value').value = sCadreValue;
	}
<!--
function popup(theURL,winName,features) { 

  window.open(theURL,winName,features);
}
function isEmpty(fieldName,strng) {
	var error = "";
	if (strng.length == 0) {
		error = fieldName + " est vide.\n"
	}
	return error;	  
}
function checkHeard (strng) {
	var error = "";
	if (strng == "") {
		error = "Vous avez entendu parler de Pop-entity par ....\n";
	}
	return error;
}
function checkWholeForm(theForm) {

    var why = '';
	why += checkHeard(theForm.heard.options[theForm.heard.selectedIndex].value);
    if (why != "") {
       alert(why);
       return false;
    }else{
		return true
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
function checkCheckOut(theForm) {
	var error = "";
	if (theForm.agree[0].checked == false) {
	   alert("Choisissez une action!.\n");
	   return false;
	}
	return true;
}
function checkProductForm(theForm, sMsg01, sMsg02, sMsg03, sMsg04, sMsg05) {
	var error = "";
	if ((theForm.product_type[0].checked == false) && (theForm.product_type[1].checked == false)) {
	   alert("Please choose Rolls or Cuts!.\n");
	   return false;
	}
	if ((theForm.product_type[0].checked == true) && (theForm.full_roll.value == '')) {
	   alert("Please enter the quantity!.\n");
	   return false;
	}
	if ((theForm.product_type[0].checked == true) && (theForm.exact_cut_m.value != '')) {
	   alert(""+sMsg03+"!.\n");
	   return false;
	}
	if ((theForm.product_type[1].checked == true) && (theForm.full_roll.value != '')) {
	   alert(""+sMsg04+"!.\n");
	   return false;
	}
	if ((theForm.product_type[1].checked == true) && (theForm.exact_cut_m.value == '')) {
	   alert("Please enter a cut value!.\n");
	   return false;
	}
	return true;
}
function checkSearchForm(theForm) {
	if (theForm.searchVar.value == '') {
	   alert("Please enter a value!.\n");
	   return false;
	}
	return true;
}
function PrintThisPage(sDivName) { 
   var sOption="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
       sOption+="scrollbars=yes,width=750,height=600,left=100,top=25"; 

   var sWinHTML = document.getElementById(sDivName).innerHTML; 
   
   var winprint=window.open("","",sOption); 
       winprint.document.open(); 
	   winprint.document.write("<html>");   
       winprint.document.write('<LINK href=../_lib/_css/global.css rel=Stylesheet>');
	   winprint.document.write("<body onLoad='javascript:document.print();'>");
       winprint.document.write(sWinHTML);          
       winprint.document.write('</body>'); 
	   winprint.document.write("</html>");
       winprint.document.close(); 
       winprint.focus();  
}

function move(fbox, tbox) {
	var arrFbox = new Array();
	var arrTbox = new Array();
	var arrLookup = new Array();
	var i;
	for (i = 0; i < tbox.options.length; i++) {
		arrLookup[tbox.options[i].text] = tbox.options[i].value;
		arrTbox[i] = tbox.options[i].text;		
	}
	var fLength = 0;
	var tLength = arrTbox.length;
	for(i = 0; i < fbox.options.length; i++) {
	arrLookup[fbox.options[i].text] = fbox.options[i].value;

	if (fbox.options[i].selected && fbox.options[i].value != "") {
		arrTbox[tLength] = fbox.options[i].text;
		tLength++;
	}
	else {
		arrFbox[fLength] = fbox.options[i].text;
		fLength++;
	   }
	}
	fbox.length = 0;
	tbox.length = 0;
	var c;
	for(c = 0; c < arrFbox.length; c++) {
		var no = new Option();
		no.value = arrLookup[arrFbox[c]];
		no.text = arrFbox[c];
		fbox[c] = no;	
	}
	for(c = 0; c < arrTbox.length; c++) {
		var no = new Option();
		no.value = arrLookup[arrTbox[c]];
		no.text = arrTbox[c];
		tbox[c] = no;
	}
}
function selectAll(box) {
     for(var i=0; i<box.length; i++) {
		 box[i].selected = true;
     }
}
function PopupPic(sPicURL) { 
     window.open( "../_include/popupProducts.php?"+sPicURL, "",  
     "resizable=1,HEIGHT=200,WIDTH=200"); 
   } 
function PopupRoomscene(sPicURL) { 
     window.open( "../_include/popupRoomscene.php?"+sPicURL, "",  
     "resizable=1,HEIGHT=200,WIDTH=200"); 
   } 
//-->