
function showpopSort(e,memo) {
 var posx = 0;
 var posy = 0;
 if (!e) var e = window.event;
 if (e.pageX || e.pageY){
  posx = e.pageX;
  posy = e.pageY;
 }
 else if (e.clientX || e.clientY) {
  posx = e.clientX + document.body.scrollLeft;
  posy = e.clientY + document.body.scrollTop;
 }
 with (document.getElementById(memo).style) { display='block'; }
}

function hidepopSort(memo) { 
	with (document.getElementById(memo).style) { display='none'; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/*
(function($) {
$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
	if ( typeof iColumn == "undefined" ) return new Array();
	if ( typeof bUnique == "undefined" ) bUnique = true;
	if ( typeof bFiltered == "undefined" ) bFiltered = true;
	if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;
	var aiRows;
	if (bFiltered == true) aiRows = oSettings.aiDisplay; 
	else aiRows = oSettings.aiDisplayMaster;
	var asResultData = new Array();	
	for (var i=0,c=aiRows.length; i<c; i++) {
		iRow = aiRows[i];
		var aData = this.fnGetData(iRow);
		
		var sValue = aData[iColumn];
		if (bIgnoreEmpty == true && sValue.length == 0) continue;
		else if (bUnique == true && jQuery.inArray(sValue, asResultData) > -1) continue;
		else asResultData.push(sValue);
	}	
	asResultData.sort();
	//console.log(asResultData );
	return asResultData;
}}(jQuery));
*/

function addslashes(str) {
 str=str.replace(/\\/g,'\\\\');
 str=str.replace(/\'/g,'\\\''); 
 str=str.replace(/\"/g,'\\"');
 str=str.replace(/\0/g,'\\0');
 return str;
}
 
function fnCreateSelect( aData )
{
	var r='<select><option value=""></option>', i, iLen=aData.length;
	for ( i=0 ; i<iLen ; i++ ) {
		r += '<option value="'+aData[i]+'">'+aData[i]+'</option>';
	}
	return r+'</select>';
}
