var MDHlib = {
	AJAX : function (settings){
		//settings - url[string], errorMessage[string], method[string], query[array], loader[object](load[function], complete[function]), parseFunction[function], queryType[XML,text]
		if (!settings.url){alert('Url not defined')}else if(!settings.query){alert('Query not defined')}else{
			settings.errorMessage = settings.errorMessage || 'Error. Can\'t create XMLHttpRequest.';
			createRequest = function (){
				var request=null;
				try{request = new XMLHttpRequest();}
					catch (trymicrosoft) {
						try{request = new ActiveXObject("Msxml2.XMLHTTP");}
						catch (othermicrosoft){
							try {request = new ActiveXObject("Microsoft.XMLHTTP");}
							catch (failed){
								request = null;
							}				
						}
					}
				if (request == null){
					alert (settings.errorMessage);
				}	
					return request;
			}
			var newRequest = createRequest();
			parseResponse = function (){
				if(newRequest.readyState == 4) {
					if (settings.loader){settings.loader.complete();}
					if(newRequest.status == 200) {
						if (settings.parseFunction){
							switch (settings.queryType){
								case 'XML':
								case 'xml':
									var Text = newRequest.responseXML;
									break;
								case 'text':
								case 'Text':
								case 'TEXT':
								default:
									var Text = newRequest.responseText;
									break;
							}
							settings.parseFunction(Text);
						}
					}else{
						alert("Error: " + newRequest.statusText);
					}
				}			
			}
			if (newRequest != null){
				var request = settings.query.join('&');
				switch (settings.method){
					case 'GET':
					case 'get':
						newRequest.open("GET",settings.url+"?"+request,true);
						newRequest.onreadystatechange = parseResponse;
						newRequest.send(null);
						break;
					case 'POST':
					case 'post':
					default:
						newRequest.open("POST",settings.url,true);
						newRequest.onreadystatechange = parseResponse;
						newRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
						newRequest.send (request);
						break;
				}
                if (settings.loader){settings.loader.load();}
            }
        }
    },
    getXMLchild : function (object) {
        //where [object], tag [string]
        //return array(tags) if tag.length > 1; object if tag.length == 1; value if tag content is value; false if no tag or no value;
        var where = object.where || false;
        var tag_name = object.tag || false;
        if (where && tag_name) {
            var tag = new Array();
            var tag1 = where.childNodes;
            for (var i = 0; i < tag1.length; i++) {
                if (tag1[i].tagName == tag_name) {tag.push(tag1[i]);}
            }
            if (tag.length == 1) {
                var childs = tag[0].childNodes;
                return (childs.length > 0) ? function () {return (childs[0].nodeValue) ? childs[0].nodeValue : tag[0]}() : false;
            } else if (tag.length > 1) {
                return tag;
            } else {
                return false;
            }
        } else {
            return false;
        }
    },
    getAbsolutePosition : function (el) {
    //get absolute position of element
        function getAbsolutePosition (el) {
            var r = { x: el.offsetLeft, y: el.offsetTop };
            if (el.offsetParent) {
                var tmp = getAbsolutePosition(el.offsetParent);
                r.x += tmp.x;
                r.y += tmp.y;
            }
            return r;
        }
        return getAbsolutePosition(el);
    },
    setCookie : function (name, value, expires, path, domain, secure) {
    //set cookies
      document.cookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
    },
    getCookie : function (name) {
    //get cookies
	    var cookie = " " + document.cookie;
	    var search = " " + name + "=";
	    var setStr = null;
	    var offset = 0;
	    var end = 0;
	    if (cookie.length > 0) {
		    offset = cookie.indexOf(search);
		    if (offset != -1) {
			    offset += search.length;
			    end = cookie.indexOf(";", offset)
			    if (end == -1) {
				    end = cookie.length;
			    }
			    setStr = unescape(cookie.substring(offset, end));
		    }
	    }
	    return(setStr);
    },
    addEvent : function (obj, type, fn) {
    //add event obj{object}, type{event}, fn{link to function}
        if (obj.addEventListener){
            obj.addEventListener(type, fn, false);
        } else if(obj.attachEvent) {
            obj.attachEvent( "on"+type, fn );
        } else {
            obj["on"+type] = fn;
        }
    },
    removeEvent : function (obj,type,fn){
    //add event obj{object}, type{event}, fn{link to function}
        if (obj.removeEventListener) {
            obj.removeEventListener(type, fn, false);
        } else if (obj.detachEvent) {
            obj.detachEvent('on'+type, fn)
        } else {
            obj["on"+type] = '';
        }
    },
    HTMLDecode : function (text) {
		var HTMLtags = new Array ('&nbsp;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&sup1;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&quot;','&circ;','&tilde;','&ensp;','&emsp;','&thinsp;','&zwnj;','&zwj;','&lrm;','&rlm;','&ndash;','&mdash;','&lsquo;','&rsquo;','&sbquo;','&ldquo;','&rdquo;','&bdquo;','&dagger;','&Dagger;','&permil;','&lsaquo;','&rsaquo;','&euro;','&fnof;','&Alpha;','&Beta;','&Gamma;','&Delta;','&Epsilon;','&Zeta;','&Eta;','&Theta;','&Iota;','&Kappa;','&Lambda;','&Mu;','&Nu;','&Xi;','&Omicron;','&Pi;','&Rho;','&Sigma;','&Tau;','&Upsilon;','&Phi;','&Chi;','&Psi;','&Omega;','&alpha;','&beta;','&gamma;','&delta;','&epsilon;','&zeta;','&eta;','&theta;','&iota;','&kappa;','&lambda;','&mu;','&nu;','&xi;','&omicron;','&pi;','&rho;','&sigmaf;','&sigma;','&tau;','&upsilon;','&phi;','&chi;','&psi;','&omega;','&thetasym;','&upsih;','&piv;','&bull;','&hellip;','&prime;','&Prime;','&oline;','&frasl;','&weierp;','&image;','&real;','&trade;','&alefsym;','&larr;','&uarr;','&rarr;','&darr;','&harr;','&crarr;','&lArr;','&uArr;','&rArr;','&dArr;','&hArr;','&forall;','&part;','&exist;','&empty;','&nabla;','&isin;','&notin;','&ni;','&prod;','&sum;','&minus;','&lowast;','&radic;','&prop;','&infin;','&ang;','&and;','&or;','&cap;','&cup;','&int;','&there4;','&sim;','&cong;','&asymp;','&ne;','&equiv;','&le;','&ge;','&sub;','&sup;','&nsub;','&sube;','&supe;','&oplus;','&otimes;','&perp;','&sdot;','&lceil;','&rceil;','&lfloor;','&rfloor;','&lang;','&rang;','&loz;','&spades;','&clubs;','&hearts;','&diams;');
		var HEXtags = new Array ('0xA0','0xA1','0xA2','0xA3','0xA4','0xA5','0xA6','0xA7','0xA8','0xA9','0xAA','0xAB','0xAC','0xAD','0xAE','0xAF','0xB0','0xB1','0xB2','0xB3','0xB4','0xB5','0xB6','0xB7','0xB8','0xB9','0xBA','0xBB','0xBC','0xBD','0xBE','0xBF','0xC0','0xC1','0xC2','0xC3','0xC4','0xC5','0xC6','0xC7','0xC8','0xC9','0xCA','0xCB','0xCC','0xCD','0xCE','0xCF','0xD0','0xD1','0xD2','0xD3','0xD4','0xD5','0xD6','0xD7','0xD8','0xD9','0xDA','0xDB','0xDC','0xDD','0xDE','0xDF','0xE0','0xE1','0xE2','0xE3','0xE4','0xE5','0xE6','0xE7','0xE8','0xE9','0xEA','0xEB','0xEC','0xED','0xEE','0xEF','0xF0','0xF1','0xF2','0xF3','0xF4','0xF5','0xF6','0xF7','0xF8','0xF9','0xFA','0xFB','0xFC','0xFD','0xFE','0xFF','0x22','0x2C6','0x2DC','0x2002','0x2003','0x2009','0x200C','0x200D','0x200E','0x200F','0x2013','0x2014','0x2018','0x2019','0x201A','0x201C','0x201D','0x201E','0x2020','0x2021','0x2030','0x2039','0x203A','0x20AC','0x192','0x391','0x392','0x393','0x394','0x395','0x396','0x397','0x398','0x399','0x39A','0x39B','0x39C','0x39D','0x39E','0x39F','0x3A0','0x3A1','0x3A3','0x3A4','0x3A5','0x3A6','0x3A7','0x3A8','0x3A9','0x3B1','0x3B2','0x3B3','0x3B4','0x3B5','0x3B6','0x3B7','0x3B8','0x3B9','0x3BA','0x3BB','0x3BC','0x3BD','0x3BE','0x3BF','0x3C0','0x3C1','0x3C2','0x3C3','0x3C4','0x3C5','0x3C6','0x3C7','0x3C8','0x3C9','0x3D1','0x3D2','0x3D6','0x2022','0x2026','0x2032','0x2033','0x203E','0x2044','0x2118','0x2111','0x211C','0x2122','0x2135','0x2190','0x2191','0x2192','0x2193','0x2194','0x21B5','0x21D0','0x21D1','0x21D2','0x21D3','0x21D4','0x2200','0x2202','0x2203','0x2205','0x2207','0x2208','0x2209','0x220B','0x220F','0x2211','0x2212','0x2217','0x221A','0x221D','0x221E','0x2220','0x2227','0x2228','0x2229','0x222A','0x222B','0x2234','0x223C','0x2245','0x2248','0x2260','0x2261','0x2264','0x2265','0x2282','0x2283','0x2284','0x2286','0x2287','0x2295','0x2297','0x22A5','0x22C5','0x2308','0x2309','0x230A','0x230B','0x2329','0x232A','0x25CA','0x2660','0x2663','0x2665','0x2666');
        text = text.replace(/&amp;/g,'&');
		for (var i = 0; i < HTMLtags.length; i++) {
            var re = new RegExp (HTMLtags[i],'g');
            text = text.replace(re,String.fromCharCode(HEXtags[i]));
		}
		return text;
	},
    HTMLEncode : function (text) {
        var HTMLtags = new Array ('&nbsp;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&sup1;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&quot;','&circ;','&tilde;','&ensp;','&emsp;','&thinsp;','&zwnj;','&zwj;','&lrm;','&rlm;','&ndash;','&mdash;','&lsquo;','&rsquo;','&sbquo;','&ldquo;','&rdquo;','&bdquo;','&dagger;','&Dagger;','&permil;','&lsaquo;','&rsaquo;','&euro;','&fnof;','&Alpha;','&Beta;','&Gamma;','&Delta;','&Epsilon;','&Zeta;','&Eta;','&Theta;','&Iota;','&Kappa;','&Lambda;','&Mu;','&Nu;','&Xi;','&Omicron;','&Pi;','&Rho;','&Sigma;','&Tau;','&Upsilon;','&Phi;','&Chi;','&Psi;','&Omega;','&alpha;','&beta;','&gamma;','&delta;','&epsilon;','&zeta;','&eta;','&theta;','&iota;','&kappa;','&lambda;','&mu;','&nu;','&xi;','&omicron;','&pi;','&rho;','&sigmaf;','&sigma;','&tau;','&upsilon;','&phi;','&chi;','&psi;','&omega;','&thetasym;','&upsih;','&piv;','&bull;','&hellip;','&prime;','&Prime;','&oline;','&frasl;','&weierp;','&image;','&real;','&trade;','&alefsym;','&larr;','&uarr;','&rarr;','&darr;','&harr;','&crarr;','&lArr;','&uArr;','&rArr;','&dArr;','&hArr;','&forall;','&part;','&exist;','&empty;','&nabla;','&isin;','&notin;','&ni;','&prod;','&sum;','&minus;','&lowast;','&radic;','&prop;','&infin;','&ang;','&and;','&or;','&cap;','&cup;','&int;','&there4;','&sim;','&cong;','&asymp;','&ne;','&equiv;','&le;','&ge;','&sub;','&sup;','&nsub;','&sube;','&supe;','&oplus;','&otimes;','&perp;','&sdot;','&lceil;','&rceil;','&lfloor;','&rfloor;','&lang;','&rang;','&loz;','&spades;','&clubs;','&hearts;','&diams;');
        var HEXtags = new Array ('0xA0','0xA1','0xA2','0xA3','0xA4','0xA5','0xA6','0xA7','0xA8','0xA9','0xAA','0xAB','0xAC','0xAD','0xAE','0xAF','0xB0','0xB1','0xB2','0xB3','0xB4','0xB5','0xB6','0xB7','0xB8','0xB9','0xBA','0xBB','0xBC','0xBD','0xBE','0xBF','0xC0','0xC1','0xC2','0xC3','0xC4','0xC5','0xC6','0xC7','0xC8','0xC9','0xCA','0xCB','0xCC','0xCD','0xCE','0xCF','0xD0','0xD1','0xD2','0xD3','0xD4','0xD5','0xD6','0xD7','0xD8','0xD9','0xDA','0xDB','0xDC','0xDD','0xDE','0xDF','0xE0','0xE1','0xE2','0xE3','0xE4','0xE5','0xE6','0xE7','0xE8','0xE9','0xEA','0xEB','0xEC','0xED','0xEE','0xEF','0xF0','0xF1','0xF2','0xF3','0xF4','0xF5','0xF6','0xF7','0xF8','0xF9','0xFA','0xFB','0xFC','0xFD','0xFE','0xFF','0x22','0x2C6','0x2DC','0x2002','0x2003','0x2009','0x200C','0x200D','0x200E','0x200F','0x2013','0x2014','0x2018','0x2019','0x201A','0x201C','0x201D','0x201E','0x2020','0x2021','0x2030','0x2039','0x203A','0x20AC','0x192','0x391','0x392','0x393','0x394','0x395','0x396','0x397','0x398','0x399','0x39A','0x39B','0x39C','0x39D','0x39E','0x39F','0x3A0','0x3A1','0x3A3','0x3A4','0x3A5','0x3A6','0x3A7','0x3A8','0x3A9','0x3B1','0x3B2','0x3B3','0x3B4','0x3B5','0x3B6','0x3B7','0x3B8','0x3B9','0x3BA','0x3BB','0x3BC','0x3BD','0x3BE','0x3BF','0x3C0','0x3C1','0x3C2','0x3C3','0x3C4','0x3C5','0x3C6','0x3C7','0x3C8','0x3C9','0x3D1','0x3D2','0x3D6','0x2022','0x2026','0x2032','0x2033','0x203E','0x2044','0x2118','0x2111','0x211C','0x2122','0x2135','0x2190','0x2191','0x2192','0x2193','0x2194','0x21B5','0x21D0','0x21D1','0x21D2','0x21D3','0x21D4','0x2200','0x2202','0x2203','0x2205','0x2207','0x2208','0x2209','0x220B','0x220F','0x2211','0x2212','0x2217','0x221A','0x221D','0x221E','0x2220','0x2227','0x2228','0x2229','0x222A','0x222B','0x2234','0x223C','0x2245','0x2248','0x2260','0x2261','0x2264','0x2265','0x2282','0x2283','0x2284','0x2286','0x2287','0x2295','0x2297','0x22A5','0x22C5','0x2308','0x2309','0x230A','0x230B','0x2329','0x232A','0x25CA','0x2660','0x2663','0x2665','0x2666');
        for (var i = 0; i < HTMLtags.length; i++) {
            var offset = 0;
            while ((offset = text.indexOf(String.fromCharCode(HEXtags[i]),offset)) != -1) {
                text = text.replace(String.fromCharCode(HEXtags[i]),HTMLtags[i]);
            }
            
        }
        return text;
    },
    nlToBr : function (text) {
        var offset = 0;
        while ((offset = text.indexOf('\n',offset)) != -1) {
            text = text.replace('\n','<br />');
        }
        offset = 0;
        while ((offset = text.indexOf('\r\n',offset)) != -1) {
            text = text.replace('\r\n','<br />');
        }
        return text;
    },
    insertAfter : function (newObj,oldObj) {
        var childs = oldObj.parentNode.childNodes;
        for (var i = 0; i < childs.length; i++) {
            if (childs[i] == oldObj) {oldObj.parentNode.insertBefore(newObj,childs[i+1]);}
        }
    },
    setCamelStyle : function (string) {
        var re = /((?:\-|\_)([a-z]){1})/g;
        if (string == 'float') string = 'styleFloat';
        if (re.test(string)) {
            string = string.replace(re, function () {
                return arguments[2].toUpperCase();
            });
        }
        return string;
    },
    modalWindow : function () {
        _this = this;
        _this.resizeWin = function () {_this.ShowGlassWindow(true)}
        var shadow = null;
        var isIE = window.navigator.userAgent.indexOf("MSIE")>-1;
        var isIE6 = window.navigator.userAgent.indexOf("MSIE 6")>-1;
        var Dialog=null;
        _this.ShowGlassWindow = function (show){
	        if(shadow == null){
                shadow = document.createElement('div');
                shadow.id = 'MWshadow';
                with(shadow.style){
                    display='none';position='fixed';height=0; width=0;zIndex=500;backgroundColor = '#000';opacity = '0.5';
		    	        if(isIE){filter="progid:DXImageTransform.Microsoft.Alpha(Opacity=50, Style=0)"}
                        if(isIE6){position='absolute';}
                    }
                    document.body.appendChild(shadow);
            }
            if(show) {
            var s = getDocumentSize();
            with(shadow.style){
                left = top = 0;
                width = s[0]+'px';
                    height = s[1]+'px';
                }
            }
	        shadow.style.display=show?'block':'none';
        }
        function getDocumentSize() {    
            return [
                document.body.scrollWidth > document.body.offsetWidth ? 
                    document.body.scrollWidth : document.body.offsetWidth,
                document.body.scrollHeight > document.body.offsetHeight ? 
                    document.body.scrollHeight : document.body.offsetHeight
            ];
        }
        function getClientSize(){
	        if(document.compatMode=='CSS1Compat') {
                return [document.documentElement.clientWidth, document.documentElement.clientHeight];
            } else {
                return [document.body.clientWidth, document.body.clientHeight];
            }
        }
        function getDocumentScroll(){
	        return [
	            self.pageXOffset || (document.documentElement && document.documentElement.scrollLeft)    
                    || (document.body && document.body.scrollLeft),
                self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) 
                    || (document.body && document.body.scrollTop)
                ];
        }
        function getClientCenter(){
            var sizes = getClientSize();
            var scrl = getDocumentScroll();
            return [parseInt(sizes[0]/2)+scrl[0], parseInt(sizes[1]/2)+scrl[1]];
        }
        _this.display = function (show,windowDiv) {
            this.ShowGlassWindow(show);
            Dialog = (typeof windowDiv == 'object') ? windowDiv : document.getElementById(windowDiv);
            if(show){
                var c = getClientCenter();
                Dialog.style.display = "block";
                var xy = [Dialog.offsetWidth*1/2,Dialog.offsetHeight*1/2];
                Dialog.style.display = "none";
                Dialog.style.position = 'absolute';
                Dialog.style.zIndex = '1000';
                Dialog.style.left = (c[0]-xy[0])+'px';
                Dialog.style.top  = (c[1]-xy[1])+'px';
                Dialog.style.display='block';
                Dialog.focus();
                MDHlib.addEvent(window,'resize',this.resizeWin);
            } else {
                if (Dialog != null) {Dialog.style.display='none';}
                MDHlib.removeEvent(window,'resize',this.resizeWin);
            }
        }
        return _this;
    }(),
    checkTags : function (Content, begin, end, condition) {
    //Content[string] - content string;begin[string] - begin searched string;end[string] - end searched string;condition[object{type[string('cut','notCut')],string(searched string)}]
    //return object {string(cuted content), bool (changed)}
	    Content2 = Content.toLowerCase();
	    var error = false;
        if (typeof condition == 'object') {
            if (typeof condition.type == 'string') {
                switch (condition.type) {
                    case 'cut' :
                        var condition = (typeof condition.string == 'string') ? condition.string.toLowerCase() : '';
                        var notFind = false;
                        break;
                    case 'notCut' :
                    default:
                        var condition = (typeof condition.string == 'string') ? condition.string.toLowerCase() : '_______clear_this_______';
                        var notFind = true;
                        break;
                }
            } else {
                var condition = '_______clear_this_______';
                var notFind = true;
            }
        } else {
            var condition = '_______clear_this_______';
            var notFind = true;
        }
        var index = 0;
	    while ((index = Content2.indexOf(begin,index)) != -1) {
	    	var substr = Content2.substring(index);
	    	index2 = substr.indexOf(end);
	    	index2 = (index2 != -1) ? index2+end.length+index : index+begin.length+index;
            var searched = Content.substring(index,index2);
            if ((searched.indexOf(condition) == -1)&notFind || !(searched.indexOf(condition) == -1)&!notFind) {
                error = true;
	    	    Content = Content.substring(0,index)+Content.substring(index2);
	    	    Content2 = Content.toLowerCase();
                index = 0;
            } else {
                index=index2;
            }
	    }
	    return {content: Content, error: error};
    },
    check_video : function (u_id,uv_id,msg,frame) {
        MDHlib.AJAX({
            url : "/",
            method : "GET",
            query : new Array ('ac=user','ac2=videostatus','uv_id='+uv_id),
            queryType : "text",
            parseFunction : function (text) {
                if (!frame) {
                    var currentWindow = undefined != window.parent.document.getElementById('premium_sidebar') ? window.parent : window;
                } else {
                    var currentWindow = window;
                }
                var redirect;
                if(text == 'STORAGE_ERROR') {
				    alert(MDHlib.HTMLDecode('Zur Zeit ist das Ansehen von Videos nicht m&ouml;glich.'));
			    }
			    if(text == 'play') {
                    redirect = "/?ac=user&ac2=playvideo&uv_id="+uv_id;             
                } else if (text == 'buyvideo') {
                    redirect = "/?ac=user&ac2=previewvideo&uv_id="+uv_id; 
                } else if (text == 'admin') {
            	    redirect = "/?ac=user&ac2=previewvideo&uv_id="+uv_id; 
                } else if (text == 'buycoins') {
                    redirect = "/?ac=user&ac2=buycoins";
	            } else if (text == 'buysubscription') {
                    redirect = "/?ac=user&ac2=buysubscription";
                } else if (xmlHttp.responseText == 'avs') {
                    redirect = "/?ac=user&ac2=avs";
                }
                if (frame) {redirect += "&isFrame=true";}
                currentWindow.location.href = redirect;
            }
        });
        return false;
    }
}
