function confirmAction($action)	{
	switch($action)	{
		case 1 :
			if(confirm("Are you sure you want to modify the record ?"))	{
				return true ;
			}
			else	{
				return false ;
			}
			break ;
		case 2 :
			if(confirm("Are you sure you want to delete the record ?"))	{
				return true ;
			}
			else	{
				return false ;
			}
			break ;
	}
}

function openWin(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function linker(where) {
	top.location = where ;
}

function postSelfForm(theForm,theUrl)
	{
	    eval('document.' + theForm + '.action = "' + theUrl + '"') ;
	    eval('document.' + theForm + '.submit()') ;
	}
	
	function postFormPop(theForm,theInput)
	{
		if(eval('document.'+theForm+'.'+theInput+'.value') != '0')	{
			myUrl = 'pop_reseller.php?country=' + eval('document.'+theForm+'.'+theInput+'.value') ;
	     window.open(myUrl,'pop','width=380,height=400,left=100,top=100,toolbar=no, statusbar=no, scrollbars=default');
		}
	}
	
	<!-- a function to make a button available -->
function buttGen(theForm,theHandler,theButton)	{
	if(eval('document.' + theForm + '.' + theHandler + '.checked == true'))	{
		eval('document.' + theForm + '.' + theButton + '.disabled = false') ;
	}
	else	{
		eval('document.' + theForm + '.' + theButton + '.disabled = true') ;
	}
}

function openWysiwygPopup(ctrlName)
	{
		window.open('/admin/WYSIWYG/index.php?ctrlName=' + ctrlName, 'titre', 'resizable=yes, toolbar=no, statusbar=no, scrollbars=no, width=750, height=620') ;
	}
	
	function openCategPopup(obj)
	{
		if(obj == null)
			curKey = 0 ;
		else
			curKey = obj.options[obj.selectedIndex].value ;

		window.open('elementcateg.php?idRubr=DV_IDRUBR&idParent=' + curKey, 'titre', 'resizable=no, toolbar=no, statusbar=no, scrollbars=yes, width=416, height=500') ;
	}
	
	// ie hack to avoid activating control trouble
function writeFlash(swf, hauteur, largeur, couleur, nom) {
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\""+hauteur+"\" height=\""+largeur+"\" id=\""+nom+"\" align=\"middle\">\n");
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n");
	document.write("<param name=\"movie\" value=\""+swf+"\" /><param name=\"quality\" value=\"high\" /><embed src=\""+swf+"\" quality=\"high\" width=\""+hauteur+"\" height=\""+largeur+"\" name=\""+nom+"\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n");
	document.write("</object>\n");
}
