// JavaScript Document

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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];}
}

function imageSwap(daImage, daSrc){
  var objStr,obj;
  /*
    WM_imageSwap()
    Changes the source of an image.
    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)
    Author: Shvatz
    Author Email: shvatz@wired.com
    Usage: WM_imageSwap(originalImage, 'newSourceUrl');
    Requires: WM_preloadImages() (optional, but recommended)
    Thanks to Ken Sundermeyer (ksundermeyer@macromedia.com) for his help
    with variables in ie3 for the mac. 
    */
  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
	self.selectedNow = daImage;
}

function popup(url){
	var winl = (screen.width - 475) / 2;
	var wint = (screen.height - 500) / 2;
	var newWindow = window.open(url,'popup','height=500,width=475,top='+wint+',left='+winl+',scrollbars=yes,menubar=no');
}

/* var IE = (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Mac") == -1 && navigator.appVersion.substring(0,1) >= 3);
var NS = (navigator.userAgent.indexOf("Mozilla") != -1 && navigator.userAgent.indexOf("Mac") == -1 && navigator.userAgent.indexOf("MSIE") == -1 && navigator.appVersion.substring(0,1) >= 4);

if (IE) {
	document.write("<link rel=STYLESHEET href=\"css/ie_style.css\" TYPE=\"text/css\">");
}
if (NS) {
	document.write("<link rel=STYLESHEET href=\"css/ns_style.css\" TYPE=\"text/css\">");
} */

function newWindow() {
	tseWindow = window.open('http://www.tse-cdnx.com/HttpController?GetPage=QuotesViewPage&DetailedView=DetailedPrices&Language=en&QuoteSymbol_1=iw&x=3&y=15', 'tseWin', 'width=500,height=600, scrollbars=yes')
}

function warWindow() {
	wtseWindow = window.open('http://www.tse-cdnx.com/HttpController?GetPage=QuotesViewPage&DetailedView=DetailedPrices&QuoteSymbol_1=iw.wt&QuoteSymbol_2=&QuoteSymbol_3=&QuoteSymbol_4=&QuoteSymbol_5=&QuoteSymbol_6=&QuoteSymbol_7=&QuoteSymbol_8=&QuoteSymbol_9=&QuoteSymbol_10=&x=0&y=0', 'tseWin', 'width=500,height=600, scrollbars=yes')
}
function pwarWindow() {
	pwtseWindow = window.open('http://www.tse-cdnx.com/HttpController?GetPage=QuotesViewPage&DetailedView=DetailedPrices&QuoteSymbol_1=IW.WT.A&QuoteSymbol_2=&QuoteSymbol_3=&QuoteSymbol_4=&QuoteSymbol_5=&QuoteSymbol_6=&QuoteSymbol_7=&QuoteSymbol_8=&QuoteSymbol_9=&QuoteSymbol_10=&x=0&y=0', 'tseWin', 'width=500,height=600, scrollbars=yes')
}






