
function showAlert(str){
    try{
        if (debugMode){alert(str);}
        if (typeof enableAlertReport!= 'undefined' && enableAlertReport && typeof _gaq!='undefined' ){
            _gaq.push(['_trackEvent', 'Start Errors', 'start-error',  str]);
	}
    }catch(e){}
}
function SetCookie( cookieName,cookieValue,nDays ) {
	try{
		var today = new Date();
		 var expire = new Date();
		 if (nDays==null || nDays==0) nDays=1;
		 expire.setTime(today.getTime() + 3600000*24*nDays);
		 document.cookie = cookieName+"="+escape(cookieValue)
		                 + ";expires="+expire.toGMTString();
	}catch(e){showAlert('SetCookie:'+e.message);}
}
function getCookie( c_name ) {
	try{
		if( document.cookie.length > 0 ) {
		  c_start = document.cookie.indexOf(c_name + "=");
		  if( c_start != -1 ) {
		    c_start = c_start+c_name.length+1;
		    c_end	= document.cookie.indexOf(";",c_start);
		    if( c_end == -1 ) c_end = document.cookie.length;
		    return unescape( document.cookie.substring( c_start,c_end ) );
		  }
		}
		return "";
	}catch(e){'getCookie:'+showAlert(e.message);}
}
function pageLoad_land() {
	try{

		urlObj = parseUrl( window.location.href );
		var url_parsed = urlObj;
		// category handiling
		//alert("here");
		if( typeof url_parsed != 'undefined' && url_parsed.category && url_parsed.category!="" ){
			var elm = document.getElementById( url_parsed.category );
			if( elm ) catClick( elm );
		}
		
		if( document.getElementById('srchCrt') ) {
			document.getElementById('srchCrt').focus();
		}

		var placeHolder = document.getElementById("728x90ad");
		//if(placeHolder && enableAdFrame)	{
			var aflttag = document.getElementsByTagName('head');
			var aflt = aflttag[0].getAttribute("a");
			//if (aflt!='openceu'   && aflt!='openceu2'   &&  aflt!='opencus'   ){
				//var attributes = {
						//src		: 'http://mystart.facemoods.com/728x90.php?need=1&aflt='+aflt,
						//id		: '728x90iframe', 
						//frameborder:"0",
						//border:"0",
						//width:"728",
						//height:"250", 
						//scrolling:"no",
						//style:"display:block; overflow: hidden; width:728px; height:250px; border:0px;"
					//};
				//var Frame = createIframe(attributes);
				//Frame.frameBorder = '0';
				//placeHolder.appendChild(Frame);
				
				placeHolder= document.getElementById("ppcbTextHolder");
				if(placeHolder)	{
					var attributes = {
							src		: "/ppcb_search.php?a="+aflt,
							id		: 'ppcbTextiframe', 
							frameborder:"0",
							border:"0",
							width:"160",
							height:"14", 
							scrolling:"no",
							style:"overflow: hidden; border:0px; width:160px; height:14px;"
						};
					Frame = createIframe(attributes);
					Frame.frameBorder = '0';
					placeHolder.appendChild(Frame);
				}
			//}
		//}
	}catch(e){showAlert('pageLoad_land:'+e.message);}
		//document.getElementById("728x90iframe").style.display = "block";
}
function catClick(elm){
	try{
		var prnt = elm.parentNode;
		if (prnt.className=='active'){
			return false;
		}
		var srchCrt = document.getElementById('srchCat');
		var spans=srchCrt.getElementsByTagName('li');
		for (var i=0; i < spans.length ; i ++){
			if (spans[i].className=='active'){
				spans[i].className = '';
			}
		}
		prnt.className='active';
		document.getElementById('category').value = String(elm.id).toLowerCase();
		$('#s').focus();
	}catch(e){showAlert('catClick:'+e.message);}
}
function changeLang(lang){
	try{
		SetCookie( "fm_language", lang, 30 );
		SetCookie( "force_lang", true, 30 );
		window.location.reload();
		// window.location = document.location.href+'&rtt='+Math.random();
	}catch(e){showAlert('changeLang:'+e.message);}
}
function toggleDisplay(id, show, bindWindowClick) {
	try{
		show = show || 'block';
		bindWindowClick = bindWindowClick || false;
		var el = document.getElementById(id);
		if (el.style.display == 'none') {
			el.style.display = show;
			if (bindWindowClick) {
				document.onclick = function(e) {
					if (!bindWindowClick) { el.style.display = 'none'; }
					bindWindowClick = false;
				}
			}
		} else {
			el.style.display = 'none';
			if ( bindWindowClick ) {
				document.onclick = null;
			}
		}
	}catch(e){showAlert('toggleDisplay:'+e.message);}
}
function catClick_results(elm){
	try{
		if (elm.className=='chsn'){
			return false;
		}
		var srchQuery = $('#s').val();
		if (srchQuery==='') {
		       srchQuery = original_query;
		}
		document.getElementById('category').value = String(elm.id).toLowerCase();
		if (srchQuery!==''){
			$('#s').val(srchQuery);
			document.getElementById('srchFrm').submit();
		} else {
			var srchCat= document.getElementById('srchCat');
			var spans=srchCat.getElementsByTagName('span');
			for (var i=0; i < spans.length ; i ++){
				if (spans[i].className.indexOf('chsn')!=-1){
					spans[i].className = '';
				}
			}
			elm.className='chsn';
		}
	} catch(e){
		showAlert('catClick_results:'+e.message);
	}
}
function adClicked(url){
	try {  
		var wnd = window.open(url, 'SearchResults');
		if (typeof window.focus !='undefined' && typeof wnd !='undefined') wnd.focus();
	}catch(e){
            showAlert('adClicked:'+e.message);
            window.location.href = url;
	}
}
function adClickedNew(url){
	try {
            if (typeof enableRedirector!= 'undefined' && enableRedirector) {
                if (chu(url)){
                    //url = 'http://' + document.location.host + '/test2.php?rurl='+url.replace(/&/g,':_:');
                    //url = 'http://' + document.location.host + '/test2.php?rurl='+escape(url);
                    showAlert(url);
                    postGo(url);
                    return false;
                }
            }
            if (typeof enableNewWindow!='undefined' && enableNewWindow){
                //showAlert('new window');
                var wnd = window.open(url, 'SearchResults');
		if (typeof window.focus !='undefined' && typeof wnd !='undefined') wnd.focus();
            } else {
                //showAlert('same window');
                window.location.href = url;    
            }
        }catch(e){
            showAlert('adClicked:'+e.message);
            window.location.href = url;
	}
}
function chu(url){
    return true;
}
//No try catch to enable redirect anyhow
function postGo(url){
    var form = document.createElement("form");
    form.setAttribute("method", "post");
    form.setAttribute("target", "SearchResults");
    form.setAttribute("action", 'http://' + document.location.host + '/rd.php');
    var hiddenField = document.createElement("input");              
    hiddenField.setAttribute("name", "rurl");
    hiddenField.setAttribute("value", escape(url));
    form.appendChild(hiddenField);
    document.body.appendChild(form);    // Not entirely sure if this is necessary                   
    form.submit();
}


function parseUrl(query) {
	try {
		var keyValuePairs = query.split(/[&?]/g);
		var params = {};
		for (var i = 0, n = keyValuePairs.length; i < n; ++i) {
			var m = keyValuePairs[i].match(/^([^=]+)(?:=([\s\S]*))?/);
			if (m) {
				var key = decodeURIComponent(m[1]);
				params[key] = decodeURIComponent(m[2]);
			}
		}
		return params;
	} catch(e) {
            showAlert('parseUrl:'+e.message);
	    return {};
	}
}
function strTrim(str){
	try{
		return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
	} catch(e){
		showAlert('strTrim:'+e.message);
	}
}
function rltdClick(elm){
	try{
		document.getElementById('s').value = elm.innerHTML;
		document.getElementById('start').value = '1';
		document.getElementById('srchFrm').submit();
	} catch(e){
		showAlert('rltdClick:'+e.message);
	}
}
function btmSubmit(){
	try{
		document.getElementById('s').value = document.getElementById('q').value;
		document.getElementById('srchFrm').submit();
	} catch(e){
		showAlert('btmSubmit:'+e.message);
	}
}
function topSubmit(){
	try{	
		document.getElementById('srchFrm').submit();
	} catch(e){
		showAlert('topSubmit:'+e.message);
	}
}
function _fm_report(str){
	try{	
		if(typeof _gaq != 'undefined') {
			 _gaq.push(['_trackPageview',str]);
		}
	} catch(e){
		showAlert('_fm_report:'+e.message);
	}
	return true;
}
function createDDScript()
{
    try{
	window.ispace_txtElements = [{id:'s', formId:'srchFrm'}];
	window.ispace_brand = 'volonet'; 
	var theBody = document.getElementsByTagName('head')[0];
	var theScript = document.createElement('script');
	theScript.type= 'text/javascript';
	theScript.src= '/assets/scripts/ptwidget-1.0.js';
	theBody.appendChild(theScript);
    }catch(e){
        showAlert('createDDScript:'+e.message);
    }
}

function createIframe(attributes) {
	try{
		var emoticonIframe = document.createElement("iframe");
		for (var attr in attributes) {
			emoticonIframe.setAttribute(attr, attributes[attr]);
		}
		return emoticonIframe;	
	}catch(e){showAlert('createIframe:'+e.message);}
}
function pgntnClick (elm,max_per_page){
	try{
		if (original_query === "") {
			return false;
		}
		var clsStr=elm.className;
		if (/pgntnItemChsn/.test(clsStr)){
			return false;
		}
		targetPg = strTrim(clsStr.substring(clsStr.indexOf('pt')+2));
		document.getElementById('start').value = (targetPg-1)*max_per_page + 1;
		$('#s').val(original_query);
		document.getElementById('srchFrm').submit();
	} catch(e){
		showAlert('pgntnClick:'+e.message);
	}
}
 

/*
 * DropDown
 */ 

var DDSPEED = 10;
var DDTIMER = 15;

// main function to handle the mouse events //
function ddMenu(id,d){
  var h = document.getElementById(id + '-ddheader');
  var c = document.getElementById(id + '-ddcontent');
  clearInterval(c.timer);
  if(d == 1){
    clearTimeout(h.timer);
    if(c.maxh && c.maxh <= c.offsetHeight){return}
    else if(!c.maxh){
      c.style.display = 'block';
      c.style.height = 'auto';
      c.maxh = c.offsetHeight;
      c.style.height = '0px';
    }
    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
  }else{
    h.timer = setTimeout(function(){ddCollapse(c)},50);
  }
}

// collapse the menu //
function ddCollapse(c){
  c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}

// cancel the collapse if a user rolls over the dropdown //
function cancelHide(id){
  var h = document.getElementById(id + '-ddheader');
  var c = document.getElementById(id + '-ddcontent');
  clearTimeout(h.timer);
  clearInterval(c.timer);
  if(c.offsetHeight < c.maxh){
    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
  }
}

// incrementally expand/contract the dropdown and change the opacity //
function ddSlide(c,d){
    //if (d==-1)return false;
  var currh = c.offsetHeight;
  var dist;
  if(d == 1){
    dist = (Math.round((c.maxh - currh) / DDSPEED));
    c.style.display = 'block';
  }else{
    dist = (Math.round(currh / DDSPEED));
  }
  if(dist <= 1 && d == 1){
    dist = 1;
  }
  c.style.height = currh + (dist * d) + 'px';
  c.style.opacity = currh / c.maxh;
  c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
  if(
  		(currh < 5 && d != 1) || 
		(currh > (c.maxh - 2) && d == 1)
	){
    clearInterval(c.timer);
    if (d != 1) {
	    c.style.opacity = 0;
	    c.style.filter = 'alpha(opacity=0)';
	    c.style.display = 'none';
    }
  }
}

/*
 * End of dropdown
 */




/* 
 * New Dropdown JS (using jquery 1.7)
 */
// initPage
$(function(){
	initInputs();
	initDrop();
});

// initDrop
function initDrop(){
	var activeClass = 'active-drop';
	$('.nav, .add-nav').each(function(){
		var wrapp = $(this);
		var elements = wrapp.find('li');
		var all_elements = $('#header').find('li');
		elements.each(function(){
			var element = $(this);
			var drop = element.find('>.drop-down');
			if(drop.length){
				var btn = element.find('.drop');
				btn.click(function(){
					if(element.hasClass(activeClass)){
						all_elements.removeClass(activeClass);
					}else{
						all_elements.removeClass(activeClass);
						element.addClass(activeClass);
					}
					return false;
				});
			}
		});
		jQuery('body').click(function(e){
			var closeFlag = false;
			var _target = e.target;
			jQuery(_target).parents().each(function(){
				var _this = $(this); 
				if (_this.hasClass('drop-down')) {closeFlag = true;} 
			})
			if (!closeFlag) {
				elements.removeClass(activeClass);
			}
		});
	})
}

// clear inputs on focus
function initInputs(){
	// replace options
	var opt = {
		clearInputs: true,
		clearTextareas: true,
		clearPasswords: true
	}
	// collect all items
	var inputs = [].concat(
		PlaceholderInput.convertToArray(document.getElementsByTagName('input')),
		PlaceholderInput.convertToArray(document.getElementsByTagName('textarea'))
	);
	// apply placeholder class on inputs
	for(var i = 0; i < inputs.length; i++) {
		if(inputs[i].className.indexOf('default') < 0) {
			var inputType = PlaceholderInput.getInputType(inputs[i]);
			if((opt.clearInputs && inputType === 'text') ||
				(opt.clearTextareas && inputType === 'textarea') || 
				(opt.clearPasswords && inputType === 'password')
			) {
				new PlaceholderInput({
					element:inputs[i],
					wrapWithElement:false,
					showUntilTyping:false,
					getParentByClass:false,
					placeholderAttr:'value'
				});
			}
		}
	}
}

// input type placeholder class
;(function(){
	PlaceholderInput = function() {
		this.options = {
			element:null,
			showUntilTyping:false,
			wrapWithElement:false,
			getParentByClass:false,
			placeholderAttr:'value',
			inputFocusClass:'focus',
			inputActiveClass:'text-active',
			parentFocusClass:'parent-focus',
			parentActiveClass:'parent-active',
			labelFocusClass:'label-focus',
			labelActiveClass:'label-active',
			fakeElementClass:'input-placeholder-text'
		}
		this.init.apply(this,arguments);
	}
	PlaceholderInput.convertToArray = function(collection) {
		var arr = [];
		for (var i = 0, ref = arr.length = collection.length; i < ref; i++) {
		 arr[i] = collection[i];
		}
		return arr;
	}
	PlaceholderInput.getInputType = function(input) {
		return (input.type ? input.type : input.tagName).toLowerCase();
	}
	PlaceholderInput.prototype = {
		init: function(opt) {
			this.setOptions(opt);
			if(this.element && this.element.PlaceholderInst) {
				this.element.PlaceholderInst.refreshClasses();
			} else {
				this.element.PlaceholderInst = this;
				if(this.elementType == 'text' || this.elementType == 'password' || this.elementType == 'textarea') {
					this.initElements();
					this.attachEvents();
					this.refreshClasses();
				}
			}
		},
		setOptions: function(opt) {
			for(var p in opt) {
				if(opt.hasOwnProperty(p)) {
					this.options[p] = opt[p];
				}
			}
			if(this.options.element) {
				this.element = this.options.element;
				this.elementType = PlaceholderInput.getInputType(this.element);
				this.wrapWithElement = (this.elementType === 'password' || this.options.showUntilTyping ? true : this.options.wrapWithElement);
				this.setOrigValue( this.options.placeholderAttr == 'value' ? this.element.defaultValue : this.element.getAttribute(this.options.placeholderAttr) );
			}
		},
		setOrigValue: function(value) {
			this.origValue = value;
		},
		initElements: function() {
			// create fake element if needed
			if(this.wrapWithElement) {
				this.element.value = '';
				this.element.removeAttribute(this.options.placeholderAttr);
				this.fakeElement = document.createElement('span');
				this.fakeElement.className = this.options.fakeElementClass;
				this.fakeElement.innerHTML += this.origValue;
				this.fakeElement.style.color = getStyle(this.element, 'color');
				this.fakeElement.style.position = 'absolute';
				this.element.parentNode.insertBefore(this.fakeElement, this.element);
			}
			// get input label
			if(this.element.id) {
				this.labels = document.getElementsByTagName('label');
				for(var i = 0; i < this.labels.length; i++) {
					if(this.labels[i].htmlFor === this.element.id) {
						this.labelFor = this.labels[i];
						break;
					}
				}
			}
			// get parent node (or parentNode by className)
			this.elementParent = this.element.parentNode;
			if(typeof this.options.parentByClass === 'string') {
				var el = this.element;
				while(el.parentNode) {
					if(hasClass(el.parentNode, this.options.parentByClass)) {
						this.elementParent = el.parentNode;
						break;
					} else {
						el = el.parentNode;
					}
				}
			}
		},
		attachEvents: function() {
			this.element.onfocus = bindScope(this.focusHandler, this);
			this.element.onblur = bindScope(this.blurHandler, this);
			if(this.options.showUntilTyping) {
				this.element.onkeydown = bindScope(this.typingHandler, this);
				this.element.onpaste = bindScope(this.typingHandler, this);
			}
			if(this.wrapWithElement) this.fakeElement.onclick = bindScope(this.focusSetter, this);
		},
		togglePlaceholderText: function(state) {
			if(this.wrapWithElement) {
				this.fakeElement.style.display = state ? '' : 'none';
			} else {
				this.element.value = state ? this.origValue : '';
			}
		},
		focusSetter: function() {
			this.element.focus();
		},
		focusHandler: function() {
			this.focused = true;
			if(!this.element.value.length || this.element.value === this.origValue) {
				if(!this.options.showUntilTyping) {
					this.togglePlaceholderText(false);
				}
			}
			this.refreshClasses();
		},
		blurHandler: function() {
			this.focused = false;
			if(!this.element.value.length || this.element.value === this.origValue) {
				this.togglePlaceholderText(true);
			}
			this.refreshClasses();
		},
		typingHandler: function() {
			setTimeout(bindScope(function(){
				if(this.element.value.length) {
					this.togglePlaceholderText(false);
					this.refreshClasses();
				}
			},this), 10);
		},
		refreshClasses: function() {
			this.textActive = this.focused || (this.element.value.length && this.element.value !== this.origValue);
			this.setStateClass(this.element, this.options.inputFocusClass,this.focused);
			this.setStateClass(this.elementParent, this.options.parentFocusClass,this.focused);
			this.setStateClass(this.labelFor, this.options.labelFocusClass,this.focused);
			this.setStateClass(this.element, this.options.inputActiveClass, this.textActive);
			this.setStateClass(this.elementParent, this.options.parentActiveClass, this.textActive);
			this.setStateClass(this.labelFor, this.options.labelActiveClass, this.textActive);
		},
		setStateClass: function(el,cls,state) {
			if(!el) return; else if(state) addClass(el,cls); else removeClass(el,cls);
		}
	}
	
	// utility functions
	function hasClass(el,cls) {
		return el.className ? el.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')) : false;
	}
	function addClass(el,cls) {
		if (!hasClass(el,cls)) el.className += " "+cls;
	}
	function removeClass(el,cls) {
		if (hasClass(el,cls)) {el.className=el.className.replace(new RegExp('(\\s|^)'+cls+'(\\s|$)'),' ');}
	}
	function bindScope(f, scope) {
		return function() {return f.apply(scope, arguments)}
	}
	function getStyle(el, prop) {
		if (document.defaultView && document.defaultView.getComputedStyle) {
			return document.defaultView.getComputedStyle(el, null)[prop];
		} else if (el.currentStyle) {
			return el.currentStyle[prop];
		} else {
			return el.style[prop];
		}
	}
}());

/* IE6 Hover fix module */
var ieHover={lazyMode:false,init:function(){this.setDefaults();return this},setDefaults:function(){this.fixActive=/MSIE 6/.test(navigator.userAgent);if(this.fixActive){this.hoverEvents=[];this.hoverQueue=[];this.activators={onhover:{on:"onmouseenter",off:"onmouseleave"},onactive:{on:"onmousedown",off:"onmouseup"}};window.attachEvent("onload",this.bind(this.domReady,this));window.attachEvent("onunload",this.bind(this.unhookHoverEvents,this))}},domReady:function(){this.pageReady=true;if(this.lazyMode){this.processStylesheets()}if(this.hoverQueue.length){for(var a=0;a<this.hoverQueue.length;a++){this.doFix(this.hoverQueue[a].s,this.hoverQueue[a].c)}}},processStylesheets:function(){var c=document.styleSheets,a=c.length;for(var b=0;b<a;b++){this.parseStylesheet(c[b])}},parseStylesheet:function(f){if(f.imports){try{var b=f.imports,a=b.length;for(var d=0;d<a;d++){this.parseStylesheet(f.imports[d])}}catch(g){}}try{var h=(this.currentSheet=f).rules,a=h.length;for(var c=0;c<a;c++){this.parseCSSRule(h[c])}}catch(g){}},parseCSSRule:function(f){var g=f.selectorText,b=f.style.cssText;if(!/(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i.test(g)||!b){return}var h=g.replace(/[^:]+:([a-z-]+).*/i,"on$1");var j=g.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi,".$2"+h);var e=(/\.([a-z0-9_-]*on(hover|active))/i).exec(j)[1];var c=g.replace(/:(hover|active).*$/,"");var a=this.parseSelector(c);if(!a.length){return}this.currentSheet.addRule(j,b);for(var d=0;d<a.length;d++){this.addHoverElement(a[d],e,this.activators[h])}},fix:function(a,b){if(this.fixActive){if(this.pageReady){this.doFix(a,b)}else{this.hoverQueue.push({s:a,c:b})}}},doFix:function(a,c){if(this.fixActive&&typeof a==="string"){var d=this.parseSelector(a);for(var b=0;b<d.length;b++){this.addHoverElement(d[b],c||"hover",this.activators.onhover)}}},addHoverElement:function(c,b,a){if(!c.hovers){c.hovers={}}if(c.hovers[b]){return}c.hovers[b]=true;this.hookHoverEvent(c,a.on,function(){c.className+=" "+b});this.hookHoverEvent(c,a.off,function(){c.className=c.className.replace(new RegExp("\\s+"+b,"g"),"")})},hookHoverEvent:function(c,b,a){c.attachEvent(b,a);this.hoverEvents[this.hoverEvents.length]={node:c,type:b,handler:a}},unhookHoverEvents:function(){for(var b,a=0;a<this.hoverEvents.length;a++){b=this.hoverEvents[a];b.node.detachEvent(b.type,b.handler)}},parseSelector:(function(){var d=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function e(g,f){var k=g.split(/\s*\,\s*/);var j=[];for(var h=0;h<k.length;h++){j=j.concat(b(k[h],f))}return j}function b(r,p,n){r=r.replace(" ","`");var m=r.match(d);var l,o,g,q,j,h;var k=[];if(m==null){m=[r,r]}if(m[1]==""){m[1]="*"}if(n==null){n="`"}if(p==null){p=document}switch(m[2]){case"#":q=m[3].match(d);if(q==null){q=[null,m[3]]}l=document.getElementById(q[1]);if(l==null||(m[1]!="*"&&!a(l,m[1]))){return k}if(q.length==2){k.push(l);return k}return b(q[3],l,q[2]);case".":if(n!=">"){o=c(p,m[1])}else{o=p.childNodes}for(j=0,h=o.length;j<h;j++){l=o[j];if(l.nodeType!=1){continue}q=m[3].match(d);if(q!=null){if(l.className==null||l.className.match("(\\s|^)"+q[1]+"(\\s|$)")==null){continue}g=b(q[3],l,q[2]);k=k.concat(g)}else{if(l.className!=null&&l.className.match("(\\s|^)"+m[3]+"(\\s|$)")!=null){k.push(l)}}}return k;case">":if(n!=">"){o=c(p,m[1])}else{o=p.childNodes}for(j=0,h=o.length;j<h;j++){l=o[j];if(l.nodeType!=1){continue}if(!a(l,m[1])){continue}g=b(m[3],l,">");k=k.concat(g)}return k;case"`":o=c(p,m[1]);for(j=0,h=o.length;j<h;j++){l=o[j];g=b(m[3],l,"`");k=k.concat(g)}return k;default:if(n!=">"){o=c(p,m[1])}else{o=p.childNodes}for(j=0,h=o.length;j<h;j++){l=o[j];if(l.nodeType!=1){continue}if(!a(l,m[1])){continue}k.push(l)}return k}}function c(g,f){if(f=="*"&&g.all!=null){return g.all}return g.getElementsByTagName(f)}function a(g,f){if(f=="*"){return true}return g.nodeName.toLowerCase().replace("html:","")==f.toLowerCase()}return e}()),bind:function(c,b,a){return function(){return c.apply(b,a||arguments)}}}.init();


