function MakeThumbs(IMG) {
	var imgx = document.getElementById(IMG).src;
	document.getElementById(IMG).src = "/clear_spacer.gif";
	imgx = imgx.replace(".gif","_tn.gif");
	imgx = imgx.replace(".jpg","_tn.gif");
	document.getElementById(IMG).src=imgx;
	document.getElementById(IMG).width="42";
	document.getElementById(IMG).height="42";
}
function loadpopup()
{
var win4
win4=window.open('/2free_popup.asp','popup_main','width=298,height=214,top=300')
}//end function load popup

function loadpopup2()
{
var win3
win3=window.open('/fotd_popup.asp','popup_u','width=360,height=470,left=500,top=100')
 if (document.all)
 {
 win3.blur()
 }
 else if (document.getElementById) //if it's navigator 6x which is different then the other navigators
 {
 //win3.blur()
 }
 else
 {
 win3.blur()
 }
}//end function loadpopup2

   function introJump() {
     var strUrl = '/index.asp?avatar=seen';
     window.location = strUrl;
   }

conBrowser=0;
function disableForm(theform) {
	if (document.all || document.getElementById) {
		for (i = 0; i < theform.length; i++) {
			var tempobj = theform.elements[i];
			if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
				tempobj.disabled = true;
		}
		return true;
	}
	else
	{
		return true;
	}
}

function setLinkSrc( sStyle ) {
	document.getElementById( "luna-tab-style-sheet" ).disabled = sStyle != "luna";

}

function replaceText(){
document.getElementById("NOTEBOOK").innerHTML=document.getElementById("NOTEBOOKhtml").innerHTML;
}

// This function is used to define if the browser supports the needed
// features
function hasSupport() {

	if (typeof hasSupport.support != "undefined")
		return hasSupport.support;

	var ie55 = /msie 5\.[56789]/i.test( navigator.userAgent );

	hasSupport.support = ( typeof document.implementation != "undefined" &&
			document.implementation.hasFeature( "html", "1.0" ) || ie55 )

	// IE55 has a serious DOM1 bug... Patch it!
	if ( ie55 ) {
		document._getElementsByTagName = document.getElementsByTagName;
		document.getElementsByTagName = function ( sTagName ) {
			if ( sTagName == "*" )
				return document.all;
			else
				return document._getElementsByTagName( sTagName );
		};
	}

	return hasSupport.support;
}

///////////////////////////////////////////////////////////////////////////////////
// The constructor for tab panes
//
// el : HTMLElement		The html element used to represent the tab pane
// bUseCookie : Boolean	Optional. Default is true. Used to determine whether to us
//						persistance using cookies or not
//
function WebFXTabPane( el, bUseCookie ) {
	if ( !hasSupport() || el == null ) return;

	this.element = el;
	this.element.tabPane = this;
	this.pages = [];
	this.selectedIndex = null;
	this.useCookie = bUseCookie != null ? bUseCookie : true;

	// add class name tag to class name
	this.element.className = this.classNameTag + " " + this.element.className;

	// add tab row
	this.tabRow = document.createElement( "div" );
	this.tabRow.className = "tab-row";
	el.insertBefore( this.tabRow, el.firstChild );

	var tabIndex = 0;
	if ( this.useCookie ) {
		tabIndex = Number( WebFXTabPane.getCookie( "webfxtab_" + this.element.id ) );
		if ( isNaN( tabIndex ) )
			tabIndex = 0;
	}
	this.selectedIndex = tabIndex;

	// loop through child nodes and add them
	var cs = el.childNodes;
	var n;
	for (var i = 0; i < cs.length; i++) {
		if (cs[i].nodeType == 1 && cs[i].className == "tab-page") {
			this.addTabPage( cs[i] );
		}
	}
}

WebFXTabPane.prototype.classNameTag = "dynamic-tab-pane-control";

WebFXTabPane.prototype.setSelectedIndex = function ( n ) {
	if (this.selectedIndex != n) {
		if (this.selectedIndex != null && this.pages[ this.selectedIndex ] != null )
			this.pages[ this.selectedIndex ].hide();
		this.selectedIndex = n;
		this.pages[ this.selectedIndex ].show();

		if ( this.useCookie )
			WebFXTabPane.setCookie( "webfxtab_" + this.element.id, n );	// session cookie
	}
};

WebFXTabPane.prototype.getSelectedIndex = function () {
	return this.selectedIndex;
};

WebFXTabPane.prototype.addTabPage = function ( oElement ) {
	if ( !hasSupport() ) return;

	if ( oElement.tabPage == this )	// already added
		return oElement.tabPage;

	var n = this.pages.length;
	var tp = this.pages[n] = new WebFXTabPage( oElement, this, n );
	tp.tabPane = this;

	// move the tab out of the box
	this.tabRow.appendChild( tp.tab );

	if ( n == this.selectedIndex )
		tp.show();
	else
		tp.hide();

	return tp;
};

WebFXTabPane.prototype.dispose = function () {
	this.element.tabPane = null;
	this.element = null;
	this.tabRow = null;

	for (var i = 0; i < this.pages.length; i++) {
		this.pages[i].dispose();
		this.pages[i] = null;
	}
	this.pages = null;
};



// Cookie handling
WebFXTabPane.setCookie = function ( sName, sValue, nDays ) {
	var expires = "";
	if ( nDays ) {
		var d = new Date();
		d.setTime( d.getTime() + nDays * 24 * 60 * 60 * 1000 );
		expires = "; expires=" + d.toGMTString();
	}

	document.cookie = sName + "=" + sValue + expires + "; path=/";
};

WebFXTabPane.getCookie = function (sName) {
	var re = new RegExp( "(\;|^)[^;]*(" + sName + ")\=([^;]*)(;|$)" );
	var res = re.exec( document.cookie );
	return res != null ? res[3] : null;
};

WebFXTabPane.removeCookie = function ( name ) {
	setCookie( name, "", -1 );
};








///////////////////////////////////////////////////////////////////////////////////
// The constructor for tab pages. This one should not be used.
// Use WebFXTabPage.addTabPage instead
//
// el : HTMLElement			The html element used to represent the tab pane
// tabPane : WebFXTabPane	The parent tab pane
// nindex :	Number			The index of the page in the parent pane page array
//
function WebFXTabPage( el, tabPane, nIndex ) {
	if ( !hasSupport() || el == null ) return;

	this.element = el;
	this.element.tabPage = this;
	this.index = nIndex;

	var cs = el.childNodes;
	for (var i = 0; i < cs.length; i++) {
		if (cs[i].nodeType == 1 && cs[i].className == "tab") {
			this.tab = cs[i];
			break;
		}
	}

	// insert a tag around content to support keyboard navigation


	var a = document.createElement( "A" );
	this.aElement = a;
	a.href = "#";
	a.onclick = function () { return false; };
	while ( this.tab.hasChildNodes() )
		a.appendChild( this.tab.firstChild );
	this.tab.appendChild( a );


	// hook up events, using DOM0
	var oThis = this;
	this.tab.onclick = function () { oThis.select(); };
	this.tab.onmouseover = function () { WebFXTabPage.tabOver( oThis ); };
	this.tab.onmouseout = function () { WebFXTabPage.tabOut( oThis ); };
}

WebFXTabPage.prototype.show = function () {
	var el = this.tab;
	var s = el.className + " selected";
	s = s.replace(/ +/g, " ");
	el.className = s;

	this.element.style.display = "block";
};

WebFXTabPage.prototype.hide = function () {
	var el = this.tab;
	var s = el.className;
	s = s.replace(/ selected/g, "");
	el.className = s;

	this.element.style.display = "none";
};

WebFXTabPage.prototype.select = function () {
	this.tabPane.setSelectedIndex( this.index );
};

WebFXTabPage.prototype.dispose = function () {
	this.aElement.onclick = null;
	this.aElement = null;
	this.element.tabPage = null;
	this.tab.onclick = null;
	this.tab.onmouseover = null;
	this.tab.onmouseout = null;
	this.tab = null;
	this.tabPane = null;
	this.element = null;
};

WebFXTabPage.tabOver = function ( tabpage ) {
	var el = tabpage.tab;
	var s = el.className + " hover";
	s = s.replace(/ +/g, " ");
	el.className = s;
};

WebFXTabPage.tabOut = function ( tabpage ) {
	var el = tabpage.tab;
	var s = el.className;
	s = s.replace(/ hover/g, "");
	el.className = s;
};


// This function initializes all uninitialized tab panes and tab pages
function setupAllTabs() {
	if ( !hasSupport() ) return;

	var all = document.getElementsByTagName( "*" );
	var l = all.length;
	var tabPaneRe = /tab\-pane/;
	var tabPageRe = /tab\-page/;
	var cn, el;
	var parentTabPane;

	for ( var i = 0; i < l; i++ ) {
		el = all[i]
		cn = el.className;

		// no className
		if ( cn == "" ) continue;

		// uninitiated tab pane
		if ( tabPaneRe.test( cn ) && !el.tabPane )
			new WebFXTabPane( el );

		// unitiated tab page wit a valid tab pane parent
		else if ( tabPageRe.test( cn ) && !el.tabPage &&
					tabPaneRe.test( el.parentNode.className ) ) {
			el.parentNode.tabPane.addTabPage( el );
		}
	}
}

function disposeAllTabs() {
	if ( !hasSupport() ) return;

	var all = document.getElementsByTagName( "*" );
	var l = all.length;
	var tabPaneRe = /tab\-pane/;
	var cn, el;
	var tabPanes = [];

	for ( var i = 0; i < l; i++ ) {
		el = all[i]
		cn = el.className;

		// no className
		if ( cn == "" ) continue;

		// tab pane
		if ( tabPaneRe.test( cn ) && el.tabPane )
			tabPanes[tabPanes.length] = el.tabPane;
	}

	for (var i = tabPanes.length - 1; i >= 0; i--) {
		tabPanes[i].dispose();
		tabPanes[i] = null;
	}
}


// initialization hook up

// DOM2
if ( typeof window.addEventListener != "undefined" )
	window.addEventListener( "load", setupAllTabs, false );

// IE
else if ( typeof window.attachEvent != "undefined" ) {
	window.attachEvent( "onload", setupAllTabs );
	window.attachEvent( "onunload", disposeAllTabs );
}

else {
	if ( window.onload != null ) {
		var oldOnload = window.onload;
		window.onload = function ( e ) {
			oldOnload( e );
			setupAllTabs();
		};
	}
	else
		window.onload = setupAllTabs;
}


/* this is a dummy webfxlayout file to be used in download zip files */


/* Do includes */

if (window.pathToRoot == null)
	pathToRoot = "./";

/*document.write('<link type="text/css" rel="stylesheet" href="local/webfxlayout.css">');*/
webfxMenuDefaultImagePath = pathToRoot + "images/";

/* end includes */

/* set up browser checks and add a simple emulation for IE4 */

// check browsers
var op = /opera 5|opera\/5/i.test(navigator.userAgent);
var ie = !op && /msie/i.test(navigator.userAgent);	// preventing opera to be identified as ie
var mz = !op && /mozilla\/5/i.test(navigator.userAgent);	// preventing opera to be identified as mz

if (ie && document.getElementById == null) {	// ie4
	document.getElementById = function(sId) {
		return document.all[sId];
	};
}

/* end browser checks */

webfxLayout = {
	writeTitle		:	function (s, s2) {
		document.write("<div id='webfx-title-background'></div>");
		if (op) {
			document.write("<h1 id='webfx-title' style='top:9px;'>" + s + "</h1>");
		}
		else {
			document.write("<h1 id='webfx-title'>" + s + "</h1>");
		}

		if (s2 == null)
			s2 = "WebFX - What you never thought possible!";
		
		if (op) {
			document.write("<span id='webfx-sub-title' style='top:46px;'>" + s2 + "</span>");
		}
		else {
			document.write("<span id='webfx-sub-title'>" + s2 + "</span>");
		}
	},
	writeMainTitle	:	function () {
		this.writeTitle("WebFX", "What you never thought possible!");	
	},
	writeTopMenuBar		:	function () {
		document.write("<div id='webfx-menu-bar-1'></div>");
		if (op) {
			document.write("<style>.webfx-menu-bar a {padding-top:3px;}</style>");
			document.write("<div id='webfx-menu-bar-2' style='height:2px;'></div>");
		}
		else
			document.write("<div id='webfx-menu-bar-2'></div>");
		document.write("<div id='webfx-menu-bar'>");// div is closed in writeBottomMenuBar
	},
	writeBottomMenuBar	:	function () {
		document.write("</div>");
		if (op)
			document.write("<div id='webfx-menu-bar-3' style='height:0px;'></div>");
		else
			document.write("<div id='webfx-menu-bar-3'></div>");
		document.write("<div id='webfx-menu-bar-4'></div>");
		document.write("<div id='webfx-menu-bar-5'></div>");
	},
	writeMenu			:	function () {
		this.writeTopMenuBar();
		//document.write(webfxMenuBar);
		document.write("<div class='webfx-menu-bar'><a href='http://webfx.eae.net'>WebFX Home</a></div>");
		this.writeBottomMenuBar();
	},
	writeDesignedByEdger	:	function () {
		if (ie && document.body.currentStyle.writingMode != null)
			document.write("<div id='webfx-about'>Page designed and maintained by " +
					"<a href='mailto:erik@eae.net'>Erik Arvidsson</a> &amp; " +
					"<a href='mailto:eae@eae.net'>Emil A Eklund</a>.</div>");
	}
};

if (ie && window.attachEvent) {
	window.attachEvent("onload", function () {
		var scrollBorderColor	=	"rgb(120,172,255)";
		var scrollFaceColor		=	"rgb(234,242,255)";
		with (document.body.style) {
			scrollbarDarkShadowColor	=	scrollBorderColor;
			scrollbar3dLightColor		=	scrollBorderColor;
			scrollbarArrowColor			=	"black";
			scrollbarBaseColor			=	scrollFaceColor;
			scrollbarFaceColor			=	scrollFaceColor;
			scrollbarHighlightColor		=	scrollFaceColor;
			scrollbarShadowColor		=	scrollFaceColor;
			scrollbarTrackColor			=	"white";
		}
	});
}

/* we also need some dummy constructors */
webfxMenuBar = {
	add : function () {}
};
function WebFXMenu() {
	this.add = function () {};
}
function WebFXMenuItem() {}
function WebFXMenuSeparator() {}
function WebFXMenuButton() {}
/*
 * This script was created by Erik Arvidsson (erik(at)eae.net)
 * for WebFX (http://webfx.eae.net)
 * Copyright 2001
 * 
 * For usage see license at http://webfx.eae.net/license.html	
 *
 * Version: 1.0
 * Created: 2001-09-27
 * Updated: 2001-11-25	Added a resize to the tooltip if the document width is too small
 *
 * Dependencies: helptip.css (To set up the CSS of the help-tooltip class)
 *
 *	Usage:
 *
 *    <script type="text/javascript" src="helptip.js"></script>
 *    <link type="text/css" rel="StyleSheet" href="helptip.css" />
 *
 *    <a class="helpLink" href="?" onclick="showHelp(event, 'String to show'); return false">Help</a>
 *
 */

function showHelpTip(e, s) {
	// find anchor element
	var el = e.target ? e.target : e.srcElement;
	while (el.tagName != "A")
		el = el.parentNode;
	
	// is there already a tooltip? If so, remove it
	if (el._helpTip) {
		document.body.removeChild(el._helpTip);
		el._helpTip = null;
		el.onblur = null;
		return;
	}

	// create element and insert last into the body
	var d = document.createElement("DIV");
	d.className = "help-tooltip";
	document.body.appendChild(d);
	d.innerHTML = s;
	
	// Allow clicks on A elements inside tooltip
	d.onmousedown = function (e) {
		if (!e) e = event;
		var t = e.target ? e.target : e.srcElement;
		while (t.tagName != "A" && t != d)
			t = t.parentNode;
		if (t == d) return;
		
		el._onblur = el.onblur;
		el.onblur = null;
	};
	d.onmouseup = function () {
		el.onblur = el._onblur;
		el.focus();
	};
	
	// position tooltip
	var dw = document.width ? document.width : document.documentElement.offsetWidth - 25;
	
	if (d.offsetWidth >= dw)
		d.style.width = dw - 10 + "px";
	else
		d.style.width = "";
	
	var scroll = getScroll();
	if (e.clientX > dw - d.offsetWidth)
		d.style.left = dw - d.offsetWidth + scroll.x + "px";
	else
		d.style.left = e.clientX - 2 + scroll.x + "px";
	d.style.top = e.clientY + 18 + scroll.y + "px";

	// add a listener to the blur event. When blurred remove tooltip and restore anchor
	el.onblur = function () {
		document.body.removeChild(d);
		el.onblur = null;
		el._helpTip = null;
	};
	
	// store a reference to the tooltip div
	el._helpTip = d;
}

// returns the scroll left and top for the browser viewport.
function getScroll() {
	if (document.all && document.body.scrollTop != undefined) {	// IE model
		var ieBox = document.compatMode != "CSS1Compat";
		var cont = ieBox ? document.body : document.documentElement;
		return {x : cont.scrollLeft, y : cont.scrollTop};
	}
	else {
		return {x : window.pageXOffset, y : window.pageYOffset};
	}
}


//
function SearchWeb() {
this.location='/search/searchresults.asp?sp-t=search&sp-a=sp10024705&sp-q=' + searchtxt + '&SMODE=web';
}

function SearchMag() {
this.location='/search/searchresults.asp?sp-t=search&sp-a=sp10024705&sp-q=' + searchtxt + '&SMODE=mag';
}

var searchtxt = ''

// TEMP MENU CODE

//Contents for menu 1
var menu1=new Array()
menu1[0]="<TABLE BORDER=0 BORDERCOLOR=#4B555C BGCOLOR=#333333 CELLPADDING=2><TR><TD WIDTH=165 class=DD1 onmouseover=this.className='DD2' onmouseout=this.className='DD1'><A HREF=javascript:SearchWeb(); Class=navwhite>TechnologyReview.com</A></TD</TR><TR>"
menu1[1]="<TD WIDTH=165 class=DD1 onmouseover=this.className='DD2' onmouseout=this.className='DD1'><A HREF=javascript:SearchMag(); Class=navwhite>Magazine Keyword</A></TD></TR></TABLE>"
 
		
var menuwidth='165px' //default menu width
var menubgcolor='black'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

var xdragapproved=false
var minrestore=0
var initialwidth,initialheight
var xie5=document.all&&document.getElementById
var xns6=document.getElementById&&!document.all

function xiecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function xdrag_drop(e){
if (xie5&&xdragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (xns6&&xdragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function xinitializedrag(e){
offsetx=xie5? event.clientX : e.clientX
offsety=xie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

xdragapproved=true
document.getElementById("dwindow").onmousemove=xdrag_drop
}

function loadwindow(url,width,height){
if (!xie5&&!xns6)
window.open(url,"","width=width,height=height,scrollbars=1")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left="30px"
document.getElementById("dwindow").style.top=xns6? window.pageYOffset*1+30+"px" : xiecompattest().scrollTop*1+30+"px"
document.getElementById("cframe").src=url
}
}

function xmaximize(){
if (minrestore==0){
minrestore=1 //xmaximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=xns6? window.innerWidth-20+"px" : xiecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=xns6? window.innerHeight-20+"px" : xiecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
}
document.getElementById("dwindow").style.left=xns6? window.pageXOffset+"px" : xiecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=xns6? window.pageYOffset+"px" : xiecompattest().scrollTop+"px"
}

function xcloseit(){
document.getElementById("dwindow").style.display="none"
}

function xstopdrag(){
xdragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}


function Trix1(){
document.getElementById("TRIX").style.height="96px"
document.getElementById("TRIX").style.width="75px"
document.getElementById("TRIXIMG").src = "new.jpg"
}

function StartTrix()
{
   var timer1 = setTimeout("Trix1();",500);
   var timer2 = setTimeout("Trix2();",6000);
   var timer3 = setTimeout("Trix3();",9000);
}
function Trix2(){
document.getElementById("TRIX").style.height="96px"
document.getElementById("TRIX").style.width="75px"
document.getElementById("TRIXIMG").src = "loading.jpg"
}
function Trix3(){
document.getElementById("TRIX").style.height="159px"
document.getElementById("TRIX").style.width="175px"
document.getElementById("TRIXIMG").src = "http://bigcharts.marketwatch.com/charts/gqplus/fpDJIA-narrow.gqplus?659"
}