/* ########################################
GLOBAL ASSETS RELEASE v5.1.7
BUILD DATE: 20091022
COPYRIGHT SUN MICROSYSTEMS INC. 2009
CONTACT US AT http://www.sun.com/secure/contact/cer.jsp?id=1073e17d-8d6c-43f6-b7e8-cf210cc89ba9 WITH ANY QUESTIONS
######################################## */

reg.click("input@name='viewType'",function(){
var _c=gebs("div#unique_id_p3 p");
var _d="Spare Parts (e.g., 370-7711):  Available up to 5 years after systems are discontinued to help you maintain your system.";
var _e="System Options (e.g., X4056A-Z): The best choice when you want to enhance or add on to your system.";
_c[0].innerHTML=(this.value=="spares")?_d:_e;
});
reg.submit("form",function(){
var _f=(this.id.indexOf("modelform")>-1)?"search-results":"warning-msg";
rcn(gebi(_f),"hidethis");
return false;
});
reg.change("select#input1",function(){
var _10=gebcn("models");
for(var i=0;i<_10.length;i++){
acn(_10[i],"hidethis");
}
rcn(gebi("modelsubmit"),"hidethis");
switch(this.value){
case ("none"):
acn(gebi("modelsubmit"),"hidethis");
break;
case ("servers"):
rcn(gebi("cmservermodels"),"hidethis");
break;
case ("storage"):
rcn(gebi("cmstoragemodels"),"hidethis");
break;
default:
rcn(gebi("cmdefaultmodels"),"hidethis");
break;
}
});
reg.click("div.ap1v1 div.header",function(){
reg.toggleClassName(this.parentNode,"ap1v1Collapsed");
this.blur();
return false;
});
reg.click("#availableproducts input@type='checkbox'",function(){
var _12=gebi("selectedproducts");
while(_12.hasChildNodes()){
_12.removeChild(_12.lastChild);
}
var _13=elem("ul");
var _14=gebs("#availableproducts input@type='checkbox'");
for(var i=0;i<_14.length;i++){
if(_14[i].checked){
productName=reg.elementText(_14[i]);
_13.appendChild(elem("li",null,productName));
}
}
_12.appendChild(_13);
});
reg.key(".cfg1 .options input@type='text'",function(ev){
var up=38,down=40;
var val=parseInt(this.value);
if(!isNaN(val)){
if(ev.keyCode===up){
val+=1;
}
if(ev.keyCode===down){
val-=1;
}
if(val<0){
val=0;
}
this.value=""+val;
}
var par=getParent(this,"tr");
if(this.value>0){
acn(par,"selected");
}else{
rcn(par,"selected");
}
});
reg.click("table.ow1v1 tr input@type='radio'",function(ev){
var _1b=getParent(this,"table");
var tr=getParent(this,"tr");
gebs("tr",_1b).forEach(function(tr){
rcn(tr,"selected");
});
acn(tr,"selected");
});
reg.change("table.ow1v1 select",function(){
var tr=getParent(this,"tr");
if(this.selectedIndex>0){
acn(tr,"selected");
}else{
rcn(tr,"selected");
}
});
reg.click(".e2v5 .e2heading",function(){
var _1f=getParent(this,".e2v5");
scn(_1f,"e2collapsed","e2expanded");
});
reg.postSetup(function(){
try{
var _20=gebi("cfg2list");
var _21=getParent(_20,"#floating-sidebar");
if(!_21){
return;
}
}
catch(ex){
return;
}
var _22=document.documentElement,w=window;
var _23=0;
window.setInterval(function(){
var _24=(w.innerHeight)?w.innerHeight:_22.clientHeight;
var _25=_21.offsetHeight;
var _26=_24-_25;
var _27=_20.offsetHeight;
var _28=(_27+_26)-30;
if(_28<100){
_28=100;
}
if(Math.abs(_23-_28)<20){
return;
}
_23=_28;
_20.style.maxHeight=_28+"px";
},500);
});
