function language_init(id,text){
	var el=document.getElementById(id);
	var act=null;
	var close=null;
	if(el){
		var a=el.getElementsByTagName('a');
		for(var i=0;a[i];i++)if(a[i].className.search(/select-active/)!=-1){act=a[i].cloneNode(a[i]);break}
		if(act==null)act=a[0].cloneNode(a[0]);
		act.onclick=function(){this.blur();return false}
		var d1=document.createElement("div");
		var d2=document.createElement("strong");
		d1.appendChild(d2);
		d1.id=el.id;
		el.id="";
		el.parentNode.insertBefore(d1,el);
		d2.appendChild(act);
		if(text&&text!=""){
			var d3=document.createElement("span");
			d3.className="text";
			d3.appendChild(document.createTextNode(text));
			act.appendChild(d3);
		}
		d1.appendChild(el);
		d1.className='select hide-menu';
		el.className="select-menu";
		var fce=function(){d1.className='select hide-menu';}
		var fceclose=function(){close=setTimeout(fce,400)};
		var fcestop=function(){clearTimeout(close)};
		d2.onclick=function(){d1.className='select';fcestop();}
		d2.onmouseout=fceclose;
		d2.onmouseover=fcestop;
		el.onmouseout=fceclose;
		el.onmouseover=fcestop;
		
		var mw=0;
		el.style.display='block';
		for(var i=0;a[i];i++){if(mw<a[i].offsetWidth)mw=a[i].offsetWidth;}
		el.style.width=mw+'px';
		el.style.display='';
	}
}

function CN (el, name) {var i, list;if (el.className) {list = el.className.split(" ");for (i = 0; i < list.length; i++) if (list[i] == name) return true;}return false;};
function rCN (el, name, c) {var i, j, curList, newList;if (el.className == "") return;newList = new Array();curList = el.className.split(" ");j=0;for (i = 0; i < curList.length; i++)if (curList[i] != name)newList[i-j]=curList[i];  else j++;if (c!=1)el.className = newList.join(" ");else return newList.join(" ")};
function aCN (el, name) {if ((el.className == "") || (el.className == " ")) el.className = name;else el.className += " " + name;}
function gPC(el,name) {while (el !=null && el.parentNode != null && !CN(el,name)) {el = el.parentNode;}if (el !=null && el.parentNode != null)return el;else return false;}
function gEC(el,class_name,tag_name) {var all_obj,ret_obj=new Array(),j=0;all_obj=el.getElementsByTagName(tag_name);for(i=0;i<all_obj.length;i++) {  if(CN(all_obj[i],class_name)) {   ret_obj[j]=all_obj[i];   j++;}}if (ret_obj.length>0) return ret_obj; else return false;}
function gPT(el,name) {while (el !=null && el.parentNode != null && el.tagName && el.tagName.toLowerCase() != name) {el = el.parentNode;}if (el !=null && el.parentNode != null)return el;else return false;}

function cUL(a){var b=gEC(gPT(a,"ul"),"show","li");for(var i=0;i<b.length;i++){if(b[i]!=a)rCN(b[i],"show");}}
function cAC(a){var b=gEC(gPT(a,"ul"),"active","a");for(var i=0;i<b.length;i++){if(a!=b[i])rCN(b[i],"active");}if(CN(a,"active"))rCN(a,"active");else aCN(a,"active");}
function OP(el){var b=gPT(el,"li");cUL(b);if(CN(b,"show"))rCN(b,"show");else aCN(b,"show");cAC(el);return false;}
function AP(el){var b=gPT(el,"li");cUL(b);cAC(el);return true;}




function Flash(){this.movie="";this.img="";this.width="";this.height="";this.alt="";this.bgcolor="transparent";this.ver=7;this.link="";this.tracker="";this.ie=((navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.appName=="Microsoft Internet Explorer")?true:false;this.className="";this.id="";this.urlparam="url";this.target="_blank";this.install=false;this.flashvars=null}
Flash.prototype.iF=function(i){if(!this.ie)return true;try{var a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);return true}catch(e){return false}}
Flash.prototype.write=function(m,w,h,a,b){var o=this.HTML(m,w,h,a,b);document.write(o)}
Flash.prototype.param=function(n,v){return '<param name="'+n+'" value="'+v+'" />';}
Flash.prototype.writeBanner=function(i,w,h,l,t,b){this.preBanner(i,null,w,h,l,t,b);var lnk=(this.link==null||this.link=="")?false:true;this.movie=this.img.slice(0,this.img.lastIndexOf('.'))+".swf"+((lnk)?"?"+this.urlparam+"="+escape(this.link):"");this.write();}
Flash.prototype.writeBannerAlt=function(i,m,w,h,l,t,b){this.preBanner(i,m,w,h,l,t,b);var lnk=(this.link==null||this.link=="")?false:true;if(m!=null&&m!='')this.movie=m+((lnk)?"?"+this.urlparam+"="+escape(this.link):"");this.write();}
Flash.prototype.preBanner=function(i,m,w,h,l,t,b){if(i!=null&&i!="")this.img=i;if(l!=null&&l!="")this.link=l;if(t!=null&&t!="")this.tracker=t;if(w!=null&&w!="")this.width=w;if(h!=null&&h!="")this.height=h;if(b!=null&&b!="")this.bgcolor=b;var lnk=(this.link==null||this.link=="")?false:true;if(lnk&&(this.tracker!=null&&this.tracker!=""))this.link=this.tracker+escape(this.link);var a='<img src="'+this.img+'" width="'+this.width+'" height="'+this.height+'" alt="" border="0" class="'+this.className+'" />';this.alt=((!lnk)?a:'<a href="'+this.link+'" target="'+this.target+'">'+a+'</a>');}
Flash.prototype.HTML=function(m,w,h,a,b){if(m!=null&&m!="")this.movie=m;if(w!=null&&w!="")this.width=w;if(h!=null&&h!="")this.height=h;if(a!=null&&a!="")this.alt=a;if(b!=null&&b!="")this.bgcolor=b;var ci=(this.ie)?' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"':'';var p=(this.ie&&this.install)?' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.ver+',0,0,0"':'';var o;var z=this.iF(this.ver);var z1=this.iF(1);if (this.movie!=null&&this.movie!=""&&(this.install||(z1&&z)||(!z1&&!z)))o='<object type="application/x-shockwave-flash" data="'+this.movie+'" width="'+this.width+'" height="'+this.height+'"'+ci+p+' id="'+this.id+'" class="'+this.className+'" >'+this.param("movie",this.movie)+((this.flashvars!=null)?this.param("flashvars",this.flashvars):"")+this.param("quality","high")+this.param("menu","false")+((this.bgcolor=="transparent")?this.param("wmode","transparent"):this.param("bgcolor",this.bgcolor))+this.alt+'</object>';else o=this.alt;return o}
Flash.prototype.writeTo=function(id,m,w,h,a,b){var el=document.getElementById(id);if(el)el.innerHTML=this.HTML(m,w,h,a,b)}

function gEI(i){return document.getElementById(i)}

function updPrice(qty_id){
var qty=gEI(qty_id);
var maintenance=document.getElementsByName('maintenance');
var P=gEI('PRICE-ROW');
var S=gEI('SAVE');
var S1=gEI('SAVE-PERCENTAGE');
var S2=gEI('SAVE-PRICE');
var C=gEI('CLIENT-PRICE');
var ST=gEI('SUBTOTAL');
var L=gEI('LICENSES');
var T=gEI('TOTAL');

var p=parseFloat(price);
var m=parseFloat(multilicenses);
var year=1;
var discount=0;
if(maintenance)
	for(var i=0;maintenance[i];i++){
		if(maintenance[i].checked){
			year=parseFloat(maintenance[i].value);
			if(typeof(discounts)=='object'&&discounts[maintenance[i].value]!=null)discount=parseFloat(discounts[maintenance[i].value]);
			break;
			}
}
var q=0;
if(qty)q=parseInt(qty.value,10);
if(isNaN(q))q=0;
var st=p*q*year;
var d=discount*st;
var t=st-d;
if(P)P.innerHTML=format(p*q);
if(ST)ST.innerHTML=format(st);
if(S)S.style.display=(d>0)?'':'none';
if(S1)S1.innerHTML=discount*100;
if(S2)S2.innerHTML=format(d)
if(L)L.innerHTML=parseInt(q*m,10);
if(C)C.innerHTML=format(t/year/q/m)
if(T)T.innerHTML=format(t);
}

function updPremiumSupportPrice(){
var qty=gEI('qty');
var P=gEI('PRICE-ROW');
var L=gEI('CREDITS');
var T=gEI('TOTAL');

var p=parseFloat(price);

var q=0;
if(qty)q=parseInt(qty.value,10);
if(isNaN(q))q=0;
var t=p*q
if(P)P.innerHTML=format(p*q);
if(L)L.innerHTML=parseInt(q,10);
if(T)T.innerHTML=format(t);
}


function format(a){
var i=parseFloat(a);
var minus='';
if(isNaN(i))i=0.00;
if(i<0)minus='-';
i=Math.abs(i);
i=parseInt((i+.005)*100);
i=i/100;
var s=new String(i);
if(s.indexOf('.')<0)s+='.00';
if(s.indexOf('.')==(s.length-2))s += '0';
s=minus+s;
return s}

function SH(id,show){
	var a=gEI(id);
	if(a)a.style.display=(show)?'block':'none';
}

function show_a(target){
	aCN(target,"hover");
}
function hide_a(target){
	rCN(target,"hover");
}

function CHECKSUBMIT(el){
	var a=gPT(el,'label');
	if(a){
		var b=document.getElementById(a.htmlFor)
		if(b){
			b.checked=true;
			b.form.submit();
		}
	}
	return false;
}

var Thumbnail={};
Thumbnail.background="black";
Thumbnail.opacity=0.8;
Thumbnail.imageBorder="";
Thumbnail.imageBoxPadding="10px";
Thumbnail.imageBoxBackground="white";
Thumbnail.imageBoxBorder="4px solid #5d5d5d";
Thumbnail.text="Click Image To Close";
Thumbnail.textColor="#5d5d5d";
Thumbnail.loaderColors=['white'];
Thumbnail.loaderOpacities=[1];
Thumbnail.loaderBull=['\u2022'];
Thumbnail.loaderBullSize=[46,40,38,36];
Thumbnail.loaderRadius=20;
Thumbnail.loaderSpeed=120;
Thumbnail.IE=((navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.appName=="Microsoft Internet Explorer")?true:false;
Thumbnail.open=function(el){if(Thumbnail.IE){s=navigator.appVersion;a = s.indexOf("MSIE");b = s.indexOf(";",a);var IEversion = parseFloat(s.substring(a+4,b))}if(Thumbnail.IE&&IEversion<6)return true;var p=document.createElement('div');Thumbnail.parent=p;var bg=document.createElement('div');document.body.appendChild(p);p.appendChild(bg);bg.style.cssText="position:absolute;z-index:1000;background:"+Thumbnail.background+";opacity:"+Thumbnail.opacity+";filter:alpha(opacity="+(Thumbnail.opacity*100)+")";Thumbnail.placeBg(bg);bg.onclick=function(){return history.back()};var imgbox=document.createElement('div');p.appendChild(imgbox);imgbox.style.cssText="top:0;left:0;position:absolute;visibility:hidden;padding:"+Thumbnail.imageBoxPadding+";background:"+Thumbnail.imageBoxBackground+";border:"+Thumbnail.imageBoxBorder+";z-index:1000;cursor:pointer;_curosr:hand;text-align:right;color:"+Thumbnail.textColor+";font-weight:bold";var img=document.createElement('img');img.style.cssText="margin:0 0 5px 0;display:block;border:"+Thumbnail.imageBorder;imgbox.appendChild(img);imgbox.appendChild(document.createTextNode(Thumbnail.text));var loading=Thumbnail.loader(p,bg,Thumbnail.loaderColors,Thumbnail.loaderOpacities,Thumbnail.loaderRadius,Thumbnail.loaderBull,Thumbnail.loaderBullSize);img.onload=function(){Thumbnail.loaded(imgbox,bg,loading)};imgbox.onclick=function(){return history.back()};img.src=el.href;window.onresize=function(){Thumbnail.placeBg(bg);Thumbnail.placeImgBox(imgbox,bg)};window.onscroll=function(){Thumbnail.placeBg(bg)};Thumbnail.History.add(Thumbnail.close);return false};
Thumbnail.close=function(){var el=Thumbnail.parent;el.parentNode.removeChild(el);window.onresize=null;window.onscroll=null;return false};
Thumbnail.loaded=function(img,bg,loader){Thumbnail.placeImgBox(img,bg);if(loader!=null)Thumbnail.stopLoader(loader);var fce=function(){img.style.visibility="visible"};setTimeout(fce,1)};
Thumbnail.placeImgBox=function(img,bg){var middle={x:bg.offsetWidth/2,y:bg.offsetHeight/2};var size={x:img.offsetWidth/2,y:img.offsetHeight/2};var x=bg.offsetLeft+middle.x-size.x;var y=bg.offsetTop+middle.y-size.y;if(x<0)x=0;if(y<0)y=0;img.style.top=y+"px";img.style.left=x+"px"};
Thumbnail.placeBg=function(bg){var scrolled=(window.pageXOffset==undefined)?{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}:{x:window.pageXOffset,y:window.pageYOffset};bg.style.width=0;bg.style.height=0;var winsize=(window.innerHeight==undefined)?{x:document.documentElement.clientWidth+'px',y:document.documentElement.clientHeight+'px'}:{x:'100%',y:'100%'};bg.style.top=scrolled.y+'px';bg.style.left=scrolled.x+'px';bg.style.width=winsize.x;bg.style.height=winsize.y;};
Thumbnail.loader=function(p,bg,color,opacity,radius,bull,bullsize){var lp=document.createElement('div');lp.id="Thumbnail-Loader";p.appendChild(lp);var fi=Math.PI/2,loader=[];var middle={x:bg.offsetWidth/2,y:bg.offsetHeight/2};for(var i=0;i<8;i++){loader[i]=document.createElement('div');var c=(color[i])?color[i]:color[color.length-1];var o=(opacity[i])?opacity[i]:opacity[opacity.length-1];var s=(bullsize[i])?bullsize[i]:bullsize[bullsize.length-1];loader[i].style.cssText="position:absolute;z-index:1001;color:"+c+";font:bold "+s+"px/"+bullsize[0]+"px arial,sans-serif;opacity:"+o+";filter:alpha(opacity="+(o*100)+");text-align:center;width:"+bullsize[0]+"px;height:"+bullsize[0]+"px;cursor:default";lp.appendChild(loader[i]);var b=(bull[i])?bull[i]:bull[bull.length-1];loader[i].innerHTML=b;};var loading;var fce=function(){fi=fi-Math.PI/4;for(var i=0;i<8;i++){var y=Math.cos(fi+Math.PI/4*i);var x=Math.sin(fi+Math.PI/4*i);if(!Thumbnail.IE)loader[i].style.visibility='hidden';loader[i].style.top=bg.offsetTop+middle.y+radius*y+'px';loader[i].style.left=bg.offsetLeft+middle.x+radius*x+'px';if(!Thumbnail.IE)loader[i].style.visibility='visible';}loading=setTimeout(fce,Thumbnail.loaderSpeed)};fce();return loading;};
Thumbnail.stopLoader=function(loader){clearTimeout(loader);var lp=document.getElementById("Thumbnail-Loader");if(lp)lp.parentNode.removeChild(lp);};
Thumbnail.History={};Thumbnail.History.hash="__";Thumbnail.History.previousHash="";Thumbnail.History.interval=null;Thumbnail.History.iframe=null;Thumbnail.History.iframeDOM=null;Thumbnail.History.undoFunction=null;Thumbnail.History.add=function(undoFunction){Thumbnail.History.undoFunction=undoFunction;if(Thumbnail.IE){Thumbnail.History.initIE();Thumbnail.History.iframe.src="";Thumbnail.History.iframe.document.open();Thumbnail.History.iframe.document.write("<html><body><script>window.onbeforeunload=function(){try{top.Thumbnail.History.back();}catch(e){}}</scr"+"ipt></body></html>");Thumbnail.History.iframe.document.close();}else{Thumbnail.History.previousHash=window.location.hash.replace(/^#/,"");window.location.hash=(Thumbnail.History.previousHash!=Thumbnail.History.hash)?Thumbnail.History.hash:Thumbnail.History.hash+"_";Thumbnail.History.interval=window.setInterval(Thumbnail.History.check,200);Thumbnail.History.initOpera();}};Thumbnail.History.check=function(){if(window.location.hash.replace(/^#/,"")==Thumbnail.History.previousHash){Thumbnail.History.undoFunction();Thumbnail.History.remove();}};Thumbnail.History.remove=function(){window.clearInterval(Thumbnail.History.interval);};Thumbnail.History.initOpera=function(){if(navigator.userAgent.toLowerCase().indexOf('opera')!=-1){var i=document.createElement('img');i.src="javascript:location.href=\'javascript:Thumbnail.History.check();\';";i.style.cssText="position: absolute; top: -1000px; left: -1000px; width: 1px; height: 1px;";document.body.appendChild(i);}};Thumbnail.History.initIE=function(){var i=document.createElement('iframe');document.body.appendChild(i);i.style.cssText="position: absolute; top: -1000px; left: -1000px; width: 1px; height: 1px;";Thumbnail.History.iframeDOM=i;Thumbnail.History.iframe=window.frames[window.frames.length-1];Thumbnail.History.iframe.src="";Thumbnail.History.iframe.document.open();Thumbnail.History.iframe.document.write("a");Thumbnail.History.iframe.document.close();};Thumbnail.History.back=function(){Thumbnail.History.undoFunction();if(Thumbnail.IE)Thumbnail.History.deleteIframe();};Thumbnail.History.deleteIframe=function(){var i=Thumbnail.History.iframeDOM;if(i)i.parentNode.removeChild(i);};

function ShowMore(el,id,txtmore,txtone){
	var a=gEI(id);
	var b='open';
	if(a){
		var d=CN(a,b);
		var c={'false':txtmore,'true':txtone};
		el.innerHTML=el.innerHTML.replace(new RegExp(c[d]),c[!d]);
		Open(id,false);
	}
	return false;
}

function Open(id,scroll){
	if(scroll==null)scroll=true;
	var a=gEI(id);
	var b='open';
	if(a){
		if(CN(a,b))rCN(a,b);
		else aCN(a,b);
		if(scroll)a.scrollIntoView(true);
	}
	return false;
}

function addCSSRule(selector,style){var css=selector+'{'+style+'}';document.write('<style type="text/css">'+css+'</style>');}

function collapse_init(id){
	var p=gEI(id);
	if(p){
		var a=gEC(p,"collapsed","div");
		if(a)
			for(i=0;i<a.length;i++){
				a[i].id="_"+a[i].id;
				var h=a[i].getElementsByTagName("h2");
				if(h[0]){
					var fce=function(){if(collapsedLast&&collapsedLast!=this)collapse(collapsedLast);return collapse(this,true)};
					h[0].onclick=fce;
				}
			}
		aCN(p,'list');
		collapse_hash();
	}
}

var collapsedLast=null;
function collapse(el,force){
var a=gPT(el,'div');
if(a){
	var h="";
	if(CN(a,'collapsed')){
rCN(a,'collapsed');
aCN(a,'expanded');
collapsedLast=el;
h=a.id.substr(1);
scrollIn(a);
}
else{
rCN(a,'expanded');
aCN(a,'collapsed');
collapsedLast=null;
};
if(h)location.href="#"+h;
else if(force)location.hash="_";
}
return false}

function scrollIn(el){var size=gS(el).y;var wind=gW().y;var scroll=gSr(el).y;var position=gPz(el).y;if((position+size-scroll)>wind)el.scrollIntoView(size>wind);else if(scroll>position)el.scrollIntoView(true)}
function gPz(el){if(el.offsetParent){var x=0;var y=0;while(el){x += el.offsetLeft;y += el.offsetTop;el=el.offsetParent}return {'x':x,'y':y}}else return {'x':el.x,'y':el.y}}
function gW() {if (window.innerWidth) return {'x':window.innerWidth,'y':window.innerHeight};else if (document.documentElement.clientHeight) {return {'x':document.documentElement.clientWidth,'y':document.documentElement.clientHeight};}else if (document.body.clientWidth) {return {'x':document.body.clientWidth,'y':document.body.clientHeight}}}
function gS(el) {return {'x':el.offsetWidth,'y':el.offsetHeight};}
function gSr(el){var d=(document.documentElement.scrollTop)?document.documentElement:document.body;return {'x':d.scrollLeft,'y':d.scrollTop}}

function collapse_hash(){
	var b=null;
	var a=location.hash.substr(1);
	if(a)b=document.getElementById("_"+a);
	var fce=function(){collapse(b)};
	setTimeout(fce,100);
	
}

function view_all(el,id,text_all,text_less){
	
	var scroll=document.getElementById(id);

	if(scroll.className=="view-all"){
		rCN(scroll,"view-all");
		el.innerHTML=text_all;
		rCN(el,"view-switch-all");
	}
	else{
		aCN(scroll,"view-all");
		el.innerHTML=text_less;
		aCN(el,"view-switch-all");
	}
	
	return false;


}


$(function(){

  $('#sttips').click(function(){
    var tipurl=$(this).attr('href');
    var max,urlbase,actual=1,loaded=[1];
    var iframe = '<iframe  frameborder="0" width="328" height="287" allowTransparency="true" />';
    
    var load = function (el,num){
      if ($.inArray(num,loaded)==-1){
        el.find('#sttip-iframes iframe').eq(num-1).attr('src',urlbase.replace(/\%number\%/,num));
        loaded.push(num);
      }
    }

    var scroll=function(el){
      load(el,getPrev());
      load(el,getNext());
      el.find('#sttip-iframes').scrollTo(328*(actual-1),400);
    }

    var getNext = function(){
      return (actual == max) ? 1 : actual+1;
    }
    var getPrev = function(){
      return (actual == 1) ? max : actual-1;
    }


    var lightDialog = $.lightDialog({
      opacity:0.8,
      onAnimateEnd:function(el){
        var that=this;
        el.children('#sttip-close').click(function(){
          that.close();
          return false
        });
        el.children('#sttip-next').click(function(){
          actual = getNext();
          scroll(el);
          return false;
        });
        el.children('#sttip-prev').click(function(){
          actual = getPrev();
          scroll(el);
          return false;
        });
        
        var f=el.find('#sttip-iframes-in');
        
        $(iframe).load(function(){
          max=window.frames[window.frames.length-1].max;
          urlbase=window.frames[window.frames.length-1].urlbase;
          f.css('width',330*max+'px');
          for(var i=2;i<=max;i++){
            f.append(iframe);
          }
          f.append('&nbsp;');
          el.find('#sttip-prev,#sttip-next').show();
          load(el,getPrev());
          load(el,getNext());
        }).attr('src',tipurl).appendTo(f);
      }
    }).animate($('<div><a id="sttip-close" href="#"></a><a id="sttip-next" href="#"></a><a id="sttip-prev" href="#"></a><div id="sttip-window"><div id="sttip-iframes"><div id="sttip-iframes-in"></div></div></div></div>'));

    return false;
  });

});


////// Initalizing Toolbar Object In Page ///////////////////////////

NS4	= (document.layers);
IE4	= (document.all);
isMac =	(navigator.appVersion.indexOf("Mac") !=	-1);
	

var isIE=((navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.appName=="Microsoft Internet Explorer");
	
function DrawTbObject(){
	if (typeof(tbr) == 'undefined') {
	  if (isIE) {
			document.write("<" + "OBJECT classid='clsid:8736C681-37A0-40C6-A0F0-4C083409151C' ID=tbr width=0 height=0></OBJECT>");
		}
	}
	else  {
		if (typeof(tbr.InstallCursor) == 'undefined') {
			if (isIE) {
			  document.write("<" + "OBJECT classid='clsid:8736C681-37A0-40C6-A0F0-4C083409151C' ID=tbr width=0 height=0></OBJECT>");
			}
		}
	}
	try {
    iSS=tbr.PluginState('SSAVER');
    sap=tbr.GetText('APP','STANDALONE_PLUGIN',''); 
    tbrver = tbr.GetFileVer('TBR');
  }
  catch (e)
  {
  } 
	return;
}
///////////////////////////////////////////////////////////

