var DELETE_CONFIRM = "Do you really want to delete.";
var UPDATE_CONFIRM = "Do you really want to update.";
var UPDATE_SUCCESS = "Update successfully.";
var SUB_CAT_ADD    = "Do you really want to add this sub category.";
var CAT_ADD        = "Do you really want to add this category.";

var JQ             = jQuery.noConflict();

String.prototype.trim = function() 
{
  var reExtraSpace = /^[ ]*(.*?)[ ]*$/;
  return this.replace(reExtraSpace, '$1');
};
Array.prototype.in_array = function(p_val) 
{
	for(var i = 0, l = this.length; i < l; i++) 
	{
		if(this[i] == p_val) 
		{
			return true;
		}
	}
	return false;
}
var loder_img = "<img src=\""+this_site_base_js+"my_code/load_from_here/loader.gif\" border=\"0\"/>";
function confirmDelete(){return confirm("Do you want to delete this?");}
function confirmChangeStatus(){return confirm("Do you want to change the status?");}


function wprint(content)
{
	var win      = null;
	mypage       = "";
	myname       = "";
	w            = 1;
	h            = 1;
	wscroll      = 0;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	//TopPosition  = (screen.height) ? (screen.height-h)/2 : 0;
	LeftPosition = LeftPosition-550;
	TopPosition  = 150;
	settings     = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+wscroll+',resizable';
	win          = window.open(mypage,myname,settings)
	win.document.write('<html><body onload="window.print();">' + content + '</body></html>');
	win.document.close();
    setTimeout(function (){ win.close(); }, 10000);
}







function l31_page_tilte(title)
{
	JQ(".l31_page_tilte").html('');
	JQ(".l31_page_tilte").html(title);
}




function strip_tags (input, allowed) 
{ 
    allowed = (((allowed || "") + "").toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join('');
    var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
        commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
    return input.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {        return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
    });
}


function EnterPressed(e) {
  var characterCode
  if(e && e.which){  
    e = e
    characterCode = e.which
  }
  else {
    e = event
    characterCode = e.keyCode
  }
  if (characterCode == 13) return true 
  else return false
}






