		function initFrames() {
		
			if( window.parent.window.frames.length>0 ) {
		
				window.top.location=window.location.href;
			}
		}

		function MM_findObj(n, d) { //v4.01
			var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
			if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
			for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
			if(!x && d.getElementById) x=d.getElementById(n); return x;
		}

		function MM_swapImage() { //v3.0
			var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
			if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
		}
		
		var newwin;

		function launchwin(winurl,winname,winfeatures) {
			newwin = window.open(winurl,winname,winfeatures);
			setTimeout('newwin.focus();',250);
		}
		function closeChat()
		{
							location = "index.php";
					}

		var xwidth = new Array();
        xwidth[0] =708;
        xwidth[1] = 708;
        xwidth[2] = 708;
        var xheight = new Array();
        xheight[0] = 290;
        xheight[1] = 550;
        xheight[2] = 550;

        function setFlashWidth(newW) {
                document.getElementById('flashResizer').style.width = xwidth[newW]+"px";
        }
        function setFlashHeight(newH) {
                document.getElementById('flashResizer').style.height = xheight[newH]+"px";
        }
        function setFlashSize(newD) {
                setFlashWidth(newD);
                setFlashHeight(newD);
        }
		function addLoadEvent(func) {
			var oldonload = window.onload;
			if (typeof window.onload != 'function') {
		    	window.onload = func;
			} else {
				window.onload = function(){
				oldonload();
				func();
				}
			}
		}
		function addEventHandler(obj, eventType, handler) {
			if (window.opera && obj.addEventListener) {
				obj.addEventListener(eventType, handler, false);
				return true;
			} else if (obj.addEventListener) {
					obj.addEventListener(eventType, handler, true);
					return true;
			} else if (obj.attachEvent) {
					var r = obj.attachEvent("on"+eventType, handler);
					return r;
			} else {
				return false;
			}
		}

		function preloadimagesevent() {
								}

		addLoadEvent(preloadimagesevent);

var xwidth = new Array();
	xwidth[0] =708;
	xwidth[1] = 708;
	xwidth[2] = 708;
	var xheight = new Array();
	xheight[0] = 285;
	xheight[1] = 570;
	xheight[2] = 570;

	function setFlashWidth(newW)
	{
		document.getElementById('freechat_flashdiv').style.width = xwidth[newW]+"px";
	}
	function setFlashHeight(newH)
	{
		document.getElementById('freechat_flashdiv').style.height = xheight[newH]+"px";
	}
	function setFlashSize(newD)
	{
		setFlashWidth(newD);
		setFlashHeight(newD);
	}
	function buyCredits()
		{
			location = "buycredit.php";
		}
	function goPrivate()
		{
			location = "logprivatchat.php";
		}
	function personalPage()
		{
			location = "perfinfo.php?";
		}
	function loginPage()
		{
			location = "login.php";
		}
	function closeChat()
	{
		location = "index.php";
	}
	
	function jsCheck()
    { 
      return true; 
    }