/*
OBLONGTECH JAVASCRIPT LIBRARY V3 UPDATED MAY2011
REQUIRES =>JQUERY 1.4.2
Edited By Dustin 201105090846
*/

//jQuery.noConflict();
//####################################################################################################
/*jquery.extend.js*/
jQuery.fn.extend({
 sib:function(n){ return jQuery(this.get(0).parentNode.childNodes).eq(jQuery(this.get(0).parentNode.childNodes).index(this.get(0))+n); }
 });

jQuery.fn.extend({
 left:function(){ return this.position().left; }
,top:function(){ return this.position().top; }
 });

jQuery.fn.extend({
 iff:function(test){
  var elems = !test || jQuery.isFunction(test)
  && !test.apply(this,Array.prototype.slice.call(arguments,1))
  ? []
  : this;
  return this.pushStack(elems,'iff',test);
  }
,cond:function(test,callback){
  var undefined;
  test = jQuery.isFunction(test) ? test.call(this) : test;
  result = !callback ? test
  : test ? callback.call(this,test)
  : undefined;
  return result !== undefined ? result : this;
  }
 });

//####################################################################################################
/*jquery.easing.js*/
jQuery.extend(jQuery.easing,{def:"easeOutQuad",jswing:"swing",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});

//####################################################################################################
/*jquery.cookies.js*/
function cookie(name,val,options){if(typeof val!="undefined"){options=options||{};if(val===null){val="";options.expires=-1}var e="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var f;if(typeof options.expires=="number"){f=new Date();f.setTime(f.getTime()+(options.expires*24*60*60*1000))}else{f=options.expires}e="; expires="+f.toUTCString()}var l=options.path?"; path="+(options.path):"";var g=options.domain?"; domain="+(options.domain):"";var a=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(val),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,name.length+1)==(name+"=")){d=decodeURIComponent(c.substring(name.length+1));break}}}return d}};
jQuery.cookie = cookie;

//####################################################################################################
/*jquery.urlparser.js*/
jQuery.url=function(){var segments={};var parsed={};var options={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var parseUri=function(){str=decodeURI(options.url);var m=options.parser[options.strictMode?"strict":"loose"].exec(str);var uri={};var i=14;while(i--){uri[options.key[i]]=m[i]||""}uri[options.q.name]={};uri[options.key[12]].replace(options.q.parser,function($0,$1,$2){if($1){uri[options.q.name][$1]=$2}});return uri};var key=function(key){if(!parsed.length){setUp()}if(key=="base"){if(parsed.port!==null&&parsed.port!==""){return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/"}else{return parsed.protocol+"://"+parsed.host+"/"}}return(parsed[key]==="")?null:parsed[key]};var param=function(item){if(!parsed.length){setUp()}return(parsed.queryKey[item]===null)?null:parsed.queryKey[item]};var setUp=function(){parsed=parseUri();getSegments()};var getSegments=function(){var p=parsed.path;segments=[];segments=parsed.path.length==1?{}:(p.charAt(p.length-1)=="/"?p.substring(1,p.length-1):path=p.substring(1)).split("/")};return{setMode:function(mode){strictMode=mode=="strict"?true:false;return this},setUrl:function(newUri){options.url=newUri===undefined?window.location:newUri;setUp();return this},segment:function(pos){if(!parsed.length){setUp()}if(pos===undefined){return segments.length}return(segments[pos]===""||segments[pos]===undefined)?null:segments[pos]},attr:key,param:param}}();

//####################################################################################################
/*jquery.colors.js*/
(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(g.state==0){g.start=c(g.elem,e);g.end=b(g.end)}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);

//####################################################################################################
/*data.js*/
jQuery.eval = function(fn){
 var id='REF_'+rand_string(); while(jQuery('#'+id).size()>0)id='REF_'+rand_string();
 document.write('<span id="'+id+'"></span>');
 jQuery(document).bind('ready',{'id':id,'fn':fn},function(event){
  jQuery('#'+event.data.id).each(event.data.fn).remove();
  });
 };
/*USAGE:
<script type="text/javascript">
 jQuery.eval(function(e){
  alert(jQuery(this).attr('id'));
  });
</script>
*/

jQuery.fn.extend({
 action:function(evt,data){ this.bind(evt,data,function(event){
 event.data.j.each(function(i){
  for(var i=0;i<event.data.x.length;i++){
   if(jQuery.contains(event.data.x[i],event.target)||event.data.x[i]==event.target){ cancel = true; }
   }
  if(!jQuery.contains(this,event.target)&&this!=event.target){ event.data.a(event,this); }
  //else{ event.stopPropagation(); }
  });
 }); }
 });//mass_level_event clone
/*USAGE:
<script type="text/javascript">
jQuery(document).action('click',{
 j:jQuery('.delete-switch').parent()//JQUERY ELEMS
,x:false//EXCLUDE ARRAY
,a:function(event,elem){//ACTION

jQuery(elem).find('.delete-switch').html('Delete');

 }});
</script>
*/

jQuery.fn.extend({
 placeholdertext:function(string){ this
 .bind('focus',function(event){ jQuery(this).removeClass('blank required'); if(this.value==string){ this.value=''; }; })
 .bind('blur',function(event){ if(this.value==''){ jQuery(this).addClass('blank').val(string); }; })
 .iff(this.get(0).nodeName.toLowerCase()!='textarea')
 .bind('keydown keyup keypress',function(event){
  if(is_key(event,'ENTER')){ jQuery(this).parents('form').eq(0).trigger('submit'); };
  })
 .end()
 .trigger('focus').trigger('blur')//.filter('.required')
 .bind('blur',function(event){ if(this.value==''){ jQuery(this).addClass('required').val(string); }; })
 .parents('form').eq(0).bind('submit',{i:this},function(e){ if(e.data.i.val()==string){ e.data.i.val(''); }; })
 ;
}//placeholdertext
,checkboxify:function(){ this
.bind('click',function(event,bool){ var bool = typeof(bool)=='undefined'?null:bool;
 if(!jQuery(this).hasClass('tag-disabled')&&jQuery(this).toggleClass('tag-selected',bool).hasClass('tag-selected')){
  jQuery('input[type*=checkbox]',this).attr('checked',true);
  }
 else{ jQuery(this).removeClass('tag-selected').find('input[type*=checkbox]').attr('checked',false); }
 jQuery('.tag-selectall',this.parentNode)
 .toggleClass('tag-selected',(jQuery('div.tag:not(.tag-disabled) input:checked',this.parentNode).size()==0));
  });
}//checkboxify
,radiobtnify:function(){ this
.bind('click',function(event,bool){ if(!jQuery(this).hasClass('tag-disabled')){
 jQuery('.tag',this.parentNode).removeClass('tag-selected');
 jQuery(this).addClass('tag-selected');
 var undefined;
 var val = (jQuery(this).attr('rel')!=undefined?jQuery(this).attr('rel'):jQuery(this).html());
 jQuery('input',this.parentNode).val(val);
 }})
.filter('.tag-selected').trigger('click')
;
}//radiobtnify
 });

//####################################################################################################
/*misc.js*/
function is_func(fn){ return typeof(fn)=='function'&&(!Function.prototype.call||typeof(fn.call)=='function'); }
function is_elem(e){ return e&&typeof(e)=='object'&&e.nodeType==1&&e.constructor==document.createElement(e.nodeName).constructor; }

//####################################################################################################
/*string.js*/
String.prototype.mreplace = function(hash_table){
 var a = []; for(var key in hash_table){ a[a.length] = key; }
 var regexp = a.join('|');
 return this.replace( new RegExp(regexp,'g'), function(m,l){ return hash_table[m] || hash_table["\\"+m]; });
 }

function camelCase(str){ return str.toString().replace(/([A-Z]+)/g, function(m,l){return l.substr(0,1).toUpperCase() + l.toLowerCase().substr(1,l.length);}).replace(/[\&\.\-\_\=\+\s\?](.?)/g, function(m, l){return l.toUpperCase();}); }

function rand_string(len,chars){
 var chars = typeof(chars)=='undefined' || !chars || chars=='' ? "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz" : chars ;
 var len = typeof(len)!='number' ? 8 : len ;
 var randomstring = '';
 for(var i=0; i<len; i++){
  var rnum = Math.floor(Math.random() * chars.length);
  randomstring += chars.substring(rnum,rnum+1);
  }
 return randomstring;
 }

//####################################################################################################
/*array.js*/

function keyofval(obj,val){ for(var i in obj){ if(obj[i]==val){ return i; } } return -1; }
function concatnest(a){ var b = []; for(var c in a){ if(is_array(a[c])){ b = b.concat(concatnest(a[c])); }else{ b.push(a[c]); } }; return b; }
function minval(a,start,end){
 start = start || 0 ; end = end || a.length;
 var min = a[start];
 for(var i=start;i<end;i++){ min = (a[i]<min) ? a[i] : min ; }
 return min;
 }
function maxval(a,start,end){
 start = start || 0 ; end = end || a.length;
 var max = a[start];
 for(var i=start;i<end;i++){ max = (a[i]>max) ? a[i] : max ; }
 return max;
 }
function sortnum(arr){ return arr.sort( function(a,b){ return a-b; } ); }
function array2string(obj,lvl){ var str=''; for(var i in obj){ /*if(lvl>0&&isArray(obj[i])){}*/ str+=i+' = '+typeof(obj[i])+'<br/>'; } return str; }

//####################################################################################################
/*elements.js*/

function getElem(elemID){
 if(document.getElementById){return document.getElementById(elemID);}
 else if(document.all){return document.all[elemID];}
 else if(document.layers) {return document.layers[elemID];}
 else{alert('Browser Doesn\'t Support DOM')}
 }
function removeElem(e){
 if(typeof(e)=='string') e = getElem(e);
 if(e && e.nodeName.toLowerCase()=='iframe'){ try{ delete window.frames[e.name]; } catch(error){  }; }
 if(e) e.parentNode.removeChild(e);
 }

function nextSib(n){ while((n = n.nextSibling) && n.nodeType != 1); return n; }
function prevSib(n){ while((n = n.previousSibling) && n.nodeType != 1); return n; }

function parseElems(a){ var c = []; var j=0; for(i=0;i<a.length;i++){ if(a[i].nodeType!=3){ c[j++]=a[i]; } } return c; }

function unique_id(){var id='REF_'+rand_string();while(jQuery('#'+id).size()>0)id='REF_'+rand_string(); return id;}
function unique_classname(){var id='REF_'+rand_string();while(jQuery('.'+id).size()>0)id='REF_'+rand_string(); return id;}

//####################################################################################################
/*keyevents.js*/

var KEYNAMES = {
 13:'ENTER'
,9:'TAB'
,16:'SHIFT'
,38:'ARROWUP',40:'ARROWDOWN'
,8:'BACKSPACE'
,46:'DELETE'
,27:'ESC'
};
var KEYCODES = {}; for(var k in KEYNAMES){ KEYCODES[KEYNAMES[k]] = k; }

function keycode(e){ var e = ( window.event || e ); var key = ( e.keyCode || e.charCode || e.which || 0 ); return key; }
function is_key(e,n){ return ( keycode(e)==(n = (typeof(n)=='string' ? KEYCODES[n.replace(/[^a-zA-Z 0-9]+/g,'').replace(/[ ]+/g,' ').toUpperCase()] : n )) ); }

var isShiftKeyHeld = false;
jQuery(document).bind('keydown',function(event){if(is_key(event,'SHIFT') && !isShiftKeyHeld) isShiftKeyHeld = true; });
jQuery(document).bind('keyup',function(event){if(is_key(event,'SHIFT')) isShiftKeyHeld = false; });

//#################################################################################################### 
/*images.js*/

function OO_preloadImages(e){//<<<ARRAY
 i = is_array(e)?e:(typeof(e.data.i)!='undefined'?e.data.i:[]);
 jQuery('body',document).append('<img src="'+(i.shift?i.shift():i[0])+'" style="display:none;" />')
 .find('>img:last-child')//.css({'display':'none'})
 //.cond(i.length>0,function(){ this.bind('load',{'i':i},OO_preloadImages); })
 .iff(i.length>0)
  .bind('load',{'i':i},OO_preloadImages)
  .end();
 }//>>>NULL
 
//#################################################################################################### 
/*stylesheets.js*/
function loadStyleSheet(href){
 var head = document.getElementsByTagName("head")[0] || document.documentElement ;
 if(jQuery('link[href="'+href+'"]',head).length<1){
  jQuery(head).append('<link rel="stylesheet" type="text/css" media="screen,projection" href="'+href+'" />');
  jQuery(head).append('<style>@import url(\''+href+'\')</style>');
  }
 }
//####################################################################################################
/*php.js*/

function strip_tags(str,allowedtags){var m="",j=false;var f=[];var a=[];var l="";var d=0;var c="";var e="";var b=function(k,i,n){return n.split(k).join(i)};if(allowedtags){a=allowedtags.match(/([a-zA-Z0-9]+)/gi)}str+="";f=str.match(/(<\/?[\S][^>]*>)/gi);for(m in f){if(isNaN(m)){continue}e=f[m].toString();j=false;for(c in a){l=a[c];d=-1;if(d!=0){d=e.toLowerCase().indexOf("<"+l+">")}if(d!=0){d=e.toLowerCase().indexOf("<"+l+" ")}if(d!=0){d=e.toLowerCase().indexOf("</"+l)}if(d==0){j=true;break}}if(!j){str=b(e,"",str)}}return str};
function is_array(q){return q&&q.constructor!=null&&q.constructor==Array;}
function in_array(needle,haystack){for(var i in haystack){if(haystack[i]==needle){return true;}}return false;}

function nl2br(str){ return str.toString().replace(/\r\n/g,'<br/>').replace(/[\r\n]/g,'<br/>'); }
function br2nl(html){ return html.toString().replace(/<br\s*\/?>/mg,"\r\n"); }

function urlencode(str){	return encodeURIComponent((str+'').toString()).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A').replace(/%20/g,'+')/*.replace(/~/g, '%7E')*/; }
function urldecode(str){ return decodeURIComponent(str.replace(/\+/g, '%20')); }

function htmlentities(html){/*OBLONGTECH CUSTOM*/
 return html.toString()
 .replace(/&/g,'&amp;')
 .replace(/</g,'&lt;')
 .replace(/>/g,'&gt;')
 .replace(/"/g,'&quot;');
 }
function htmlspecialchars_decode(string){ return string.toString().split('&quot;').join('"').split('&lt;').join('<').split('&gt;').join('>').split('&amp;').join('&'); }

/*######################################################################*/
/*jquery.rte.js*/

jQuery.fn.extend({
rte:function(id){
this.parent().css({'padding-right':'0px'});
return this.tinymce({
	body_id : 'rte_'+id,
 init_instance_callback : function(rte){ jQuery(rte.getContainer()).css({'visibility':'visible'}); }
 
 ,script_url : 'js/tinymce/tiny_mce.js'
 ,content_css : 'css/tiny_mce_iframe.css'
 
 ,theme : 'advanced', skin : 'o2k7'//,	skin_variant : 'black'
 ,plugins : 'safari,save,inlinepopups,style,paste,preview,fullscreen'//,advimage
 
 ,paste_auto_cleanup_on_paste : true
 ,paste_preprocess : function(pl, o){
  o.content = strip_tags(o.content.replace(/<\/div>/g,'</div><br/>'),'<br><hr><em><i><strong><b><p><h1><h2><a><img><strike><u>');
  }
 ,paste_block_drop : true
 ,paste_strip_class_attributes : 'all'
 ,paste_remove_spans : true
 ,paste_remove_styles : true
 
 ,theme_advanced_blockformats : 'p'
 ,theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,indent,outdent,forecolor,backcolor,removeformat,|,hr,|,link,unlink,|,image,|,code,|,fullscreen' ,theme_advanced_buttons2 : false ,theme_advanced_buttons3 : false
 ,theme_advanced_toolbar_location : 'top' ,theme_advanced_toolbar_align : 'left' ,theme_advanced_statusbar_location : 'bottom'
 ,theme_advanced_resizing : true , theme_advanced_resize_horizontal : false
 
 //,force_br_newlines : true
 
 ,setup : function(ed){
  ed.onKeyDown.add(function(ed,e){ if(e.ctrlKey && (e.keyCode == 83 || e.KeyCode == 115)){ stopEvent(event); return false; }; });
  }
 });
 }
});
/*######################################################################*/
/*ajax_form_iframe.js*/

function ajax_form(form){
 if(!document.getElementById('ajax_formpost_container')){
  var i = document.createElement('div'); i.id = 'ajax_formpost_container'; i.style.display = 'none'; document.body.appendChild(i);
  }
 else{ var i = document.getElementById('ajax_formpost_container'); }
 
 if(document.getElementById('ajax_formpost_iframe')){ removeElem('ajax_formpost_iframe'); }
 
 i.innerHTML = '<iframe name="ajax_formpost_iframe" src="init.html" id="ajax_formpost_iframe" style="display:none;" onload="setTimeout(function(){ ajax_form_iframe_onload(); },1);"></iframe>';
 form.target = 'ajax_formpost_iframe';
 form.submit();
 }
function ajax_form_iframe_onload(){ var i = window.frames.ajax_formpost_iframe || document.getElementById('ajax_formpost_iframe').contentWindow ; if( i.init() ){ ajax_form_iframe_delete(); } };
function ajax_form_iframe_delete(){ removeElem('ajax_formpost_iframe'); removeElem('ajax_formpost_container'); }



