new Asset.javascript('../cssjs/niftys.js');
new Asset.css('../cssjs/niftys.css');
window.addEvent('domready', function(){
if (($('prodt')) && ($('gprod'))) {$('prodt').setText($('gprod').getText());}
Nifty("div.gppr","transparent");
Nifty("div#content","big transparent");
var mVSs = Array();
if($('detlist')) {var pds = $$('#detlist p');}
else {var pds = $$('ul.detlist p');}
pds.each(function(pcont,z) {
var strspan = pcont.getElement('span');
var mVS = new Fx.Slide(strspan, {duration:300});
var dpea = new Element('a').injectTop(pcont);
dpea.title='Description';
dpea.addClass('togleo');
var otsc = '#e3e505';
dpea.addEvent('mouseenter', function(){otsc=this.style.backgroundColor;this.style.backgroundColor='#109901';});
dpea.addEvent('mouseleave', function(){this.style.backgroundColor=otsc;});
dpea.addEvent('click', function(){dpea.toggleClass('togleoad');mVS.toggle();});
var pfont = pcont.getElements('font');
pfont.each(function(pfelet,x) {
pfelet.addClass('font'+x);
pfelet.addEvent('mouseenter', function(){var tefontclass = $$('.'+this.className);tefontclass.each(function(felte){felte.setStyles('color:#006;background-color:#f2f29c;border-bottom:1px solid #ccc');});});
pfelet.addEvent('mouseleave', function(){var tlfontclass = $$('.'+this.className);tlfontclass.each(function(feltl){feltl.setStyles('color:#000;background-color:#ffffff;border-bottom:1px solid #fff');});});
});
if($('container').hasClass('zz') && (!(strspan.hasClass('z')))){mVS.slideOut();dpea.addClass('togleoad');}
});

function m_e(meo,meostyle,meh,meosa){if(meostyle!='')meo.setStyles(meostyle);if(meo.getElement('a'))meo.getElement('a').setStyles(meosa);meh.style.visibility='visible';}
function m_l(mlo,mlostyle,mlh,mlosa){if(mlostyle!='')mlo.setStyles(mlostyle);if(mlo.getElement('a'))mlo.getElement('a').setStyles(mlosa);mlh.style.visibility='hidden';}
function mtodo(pes,psye,psyl,pls,mssae,mssal){
if(mssae==null) mssae='';
if(mssal==null) mssal='';
pes.addEvent('mouseenter',function(){m_e(pes,psye,pls,mssae);});
pes.addEvent('mouseleave',function(){m_l(pes,psyl,pls,mssal);});
pls.addEvent('mouseenter',function(){m_e(pes,psye,pls,mssae);});
pls.addEvent('mouseleave',function(){m_l(pes,psyl,pls,mssal);});
}
if(!($('tabnav'))){
var el_pfirsth1 = $('pfirst').getElement('h1')
var el_pfirsth1span = new Element('span');
el_pfirsth1span.setText(el_pfirsth1.getText());
el_pfirsth1.empty();
el_pfirsth1.adopt(el_pfirsth1span);
if($('pdetas')){
var el_pdetas = $('pdetas');
mtodo(el_pfirsth1span,'cursor:pointer;color:#363','color:#000',el_pdetas);
if($$('div.dho')!=''){el_pdetas.style.marginTop='-8px';}
}
}

var menujrt = $$('li.jtr');
var lieleft = 0;
menujrt.each(function(lielt,pv) {
if(pv==0) lieleft = 10;
else lieleft = menujrt[pv-1].getCoordinates().width + lieleft;
var sonul = lielt.getElement('ul').setStyles('background-color:#009;display:inline-block;margin-left:' + lieleft + 'px;padding:5px 12px 9px 10px;margin-top:-8px;list-style-type:none;z-index:199;position:absolute;visibility:hidden').injectInside('mendis');
var _pos = sonul.getCoordinates();
sonul.style.width=_pos.width-22+'px';
mtodo(lielt,'cursor:pointer;color:#fff;background-color:#009','color:#000;background-color:#e3e505',sonul,'color:#ff9','color:#006');
});

var imgdiv = $$('.imgf');
imgdiv.each(function(igd) {
var imgwidth = igd.getElement('img').getCoordinates().width;
if(imgwidth < 200){
igd.style.width = '200px';
igd.getElement('img').setStyles('padding:5px '+((200-imgwidth)/2+5)+'px');
}else{igd.style.width = imgwidth + 'px';}
});

if($('tabnav')){

var gplast = $$('div.divgp').getLast();
var lastdiv = new Element('div').injectAfter(gplast);
lastdiv.className='divgp';
lastdiv.title='General Information';
if($('pdetas')){
var _pds=$('pdetas');
_pds.injectInside(lastdiv);
if(!_pds.getElement('h2')) {_pds.style.paddingTop='10px';}
_pds.className='gppr';
_pds.id='newpdet';
}

var ncn = $('content').getStyle('backgroundColor').hexToRgb(true);
var pcrnew = ("rgb("+(ncn[0]-18)+","+(ncn[1]-18)+","+(ncn[2]-18)+")").rgbToHex();
var xdiv=$('tabnav');
xdiv.setStyles('margin:6px 0 2px 0;padding-left:10px;');
var iscroldiv=new Element('div').setStyles('overflow:hidden;width:938px;position:relative;');
var xdl=new Element('dl').setStyles('height:24px;position:relative;');
var xddstyle='display:block;font-size:11px;font-weight:normal;color:#330;background-color:' + pcrnew + ';background-position:left -68px;background-image:url(../image/dlayer/tw-third-tab.gif);background-repeat:repeat-x;line-height:16px;margin-right:2px;padding:3px 6px;cursor:pointer;float:left;';
var pds = $$('div.divgp');
pds.each(function(ddrw,i) {
//var ttemp=ddrw.title; ttemp=ttemp.replace(/[&|\(|\)]/g,"").replace(/\s{1,}/g,"_");
var xdd=new Element('dd',{'id': '_'+(i+1)}).setText(ddrw.title);
xdd.setStyles(xddstyle);
xdd.onclick=function(){
$$('#tabnav dd').each(function(ed){
ed.style.backgroundColor=pcrnew;
ed.style.backgroundPosition='left -68px';
ed.style.color='#330';
ed.removeEvents('mouseleave');
ed.addEvent('mouseleave',function(){this.style.backgroundColor=pcrnew;ed.style.backgroundPosition='left -68px';});
});
pds.each(function(et){et.style.display='none'});
xdd.style.backgroundColor='#fff';
xdd.style.backgroundPosition='left 0px';
xdd.style.color='#000';
xdd.removeEvents('mouseleave');
xdd.addEvent('mouseleave',function(){xdd.style.backgroundColor='#fff';xdd.style.backgroundPosition='left 0px';});
ddrw.style.display='';
}
xdd.addEvent('mouseenter',function(){xdd.style.backgroundColor='#f3f3f3';xdd.style.backgroundPosition='left -34px';});
xdd.addEvent('mouseleave',function(){this.style.backgroundColor=pcrnew;this.style.backgroundPosition='left -68px';});
xdd.injectInside(xdl);
ddrw.title='';
ddrw.style.display='none';
if (!i) {
xdd.style.backgroundColor='#fff';
xdd.style.backgroundPosition='left 0px';
xdd.style.color='#000';
xdd.removeEvents('mouseleave');
xdd.addEvent('mouseleave',function(){xdd.style.backgroundColor='#fff';xdd.style.backgroundPosition='left 0px';});
ddrw.style.display=''
}
//-10.20-f
if (ddrw.getElement('a')){
var drwa=ddrw.getElement('a');
if (drwa.hasClass('maod')){xdd.id=ddrw.getElement('a').name; ddrw.getElement('a').injectInside(xdd);}
}
//-10.20-e
});
xdl.injectInside(iscroldiv);
iscroldiv.injectInside(xdiv);
$$('div#tabnav dd').each(function(ddtemp) {ddtemp.style.width=ddtemp.getCoordinates().width-12+'px';});
Nifty("div#tabnav dd","transparent");
}

Nifty("div#pdetas p","transparent");
Nifty("div.adcore p","transparent");
Nifty("ul#detlist p","transparent");
Nifty("ul.detlist p","transparent");
Nifty("p.descpt","transparent");
Nifty("div#newpdet","transparent");
Nifty("div#pdetas","transparent");
Nifty("div.imgf","transparent");

var tabcstd = $$('table.taby');
tabcstd.each(function(ttbb) {
var tbtr = ttbb.getElements('tr');
tbtr.each(function(eltr) {
var tfsx = new Fx.Styles(eltr, {duration:200, wait:false});
eltr.addEvent('mouseenter', function(){
tfsx.start({'background-color': '#e2eef4'});
});
eltr.addEvent('mouseleave', function(){
tfsx.start({'background-color': '#fff'});
});
});
var tatd = ttbb.getElements('td');
tatd.each(function(entd) {
if((entd.getProperty('rowspan')>1) && (!(entd.getParent().hasClass('tatr')))) entd.style.backgroundColor='#fff';
});
});


var gttp = function(){
var agt = new Element('a', {'href': '#top', 'events': {'click': function(e){e=new Event(e).stop(); var soull=new Fx.Scroll(window).toTop();}}}).setHTML('Click&nbsp;ME&nbsp;to&nbsp;Top&nbsp;Page').inject(document.body);
agt.setStyles("position:fixed;_position:absolute;display:block;text-decoration:none;width:116px;right:2px;bottom:2px;color:black;font-weight:bold;border:1px solid green;background:#e3e505;padding:8px 10px;text-align:center;");
agt.setOpacity(0); window.addEvent('scroll',function(e) {if(window.getScrollTop() > 60){agt.setOpacity(0.8);} else {agt.setOpacity(0);}});
}; gttp();


var alla = $$('a');
alla.each(function(ael){ael.onfocus=function(){ael.blur()}; if(/\.pdf/.test(ael.href)) ael.target='_blank';});
if (/MSIE (5\.5|6\.)/.test(navigator.userAgent)) $('content').style.backgroundImage='none';

var wlhsa=window.location.href.split("/"); var whsct=wlhsa[wlhsa.length-2];
var sga = $$('.divgp strong a'); sga.each(function(ak){if(!(ak.href.test(whsct))) ak.target='_blank';});

$$('div#tabnav dd').each(function(mdnm) {
if(mdnm.id!=''){if (window.location.href.test(mdnm.id, "i")) mdnm.onclick();}
});

});