// JavaScript Document
   var elem = "td";
   var rClick=false;
   var c=0
   var Hlength=0;
   addSArrayBool=false;
function createHighLight(Obj,td){
		if(document.getElementsByTagName){
			if(td=='tr'){
				elem='tr';
				}
			else{
				elem='td';
			}
			
			var el = document.getElementById(Obj).getElementsByTagName(elem);
			if(td=='tr'){Hlength=el.length;	}else{Hlength=el.length;}

			
			for(var i=0; i<Hlength-1; i++){
			
			 el[i].onmouseover = function(){
				this.oldClassName=this.className
				
					if(this.className=="subMenuBg"){
						this.className = "OverMenuSub";
					}
					else if(this.className=="selectedMenu"){
						this.className = "selectedMenu";
					}
					else if(this.className=="selectedMenuSub"){
						this.className = "selectedMenuSub";
					}
					else if(this.className=="selectedMenuDownArrow"){
						this.className = "selectedMenuDownArrow";
					}
					else{
						this.className = "overMenu";	
					}
			 }
			 el[i].onmouseout = function(){
					if(rClick==false || this.className!="selectedMenu"){
						this.className =this.oldClassName;
			 		}
			  }
			}
		}
}

function hightlightSelectedMenu(Obj,Num){
	var el = document.getElementById(Obj).getElementsByTagName(elem);
	el[Num].className = "selectedMenu";
}

function calculatePrice(){
	 hddVal=$('HDDQty').value
	 flashVal=$('flashDriveQty').value
	 HDD_actualVal=$('HDDActPrice').value
	 FL_actualVal=$('flActPrice').value
	
	SoFLASHDRIVEUP=FL_actualVal*flashVal;
	SoHDDDRIVEUP=HDD_actualVal*hddVal;
	SoGT=SoFLASHDRIVEUP+SoHDDDRIVEUP
	
	 $('flDriveUP').innerHTML="$ "+SoFLASHDRIVEUP+".00";
	 $('hddDriveUP').innerHTML="$ "+SoHDDDRIVEUP+".00";
	 $('totalPrice').innerHTML="<b>$ "+SoGT+".00</b>";
}


function ChangeLBPosSize(type){
		
			if(type==1){
				$('lightbox').style.width='650px'
				$('lightbox').style.height='500px'
				$('lightbox').style.left='40%'
				$('lightbox').style.top='40%'
	
				}
			else if(type==2){
				$('lightbox').style.width='360px'
				$('lightbox').style.height='300px'
				$('lightbox').style.left='55%'
				$('lightbox').style.top='60%'
				}
			else if(type==3){
				$('lightbox').style.width='600px'
				$('lightbox').style.height='500px'
				$('lightbox').style.left='45%'
				$('lightbox').style.top='50%'
				}
			else if(type==4){
				$('lightbox').style.width='600px'
				$('lightbox').style.height='300px'
				$('lightbox').style.left='45%'
				$('lightbox').style.top='70%'
				}
			else if(type=="big"){
				$('lightbox').style.width='850px'
				$('lightbox').style.height='500px'
				$('lightbox').style.left='33%'
				$('lightbox').style.top='38%'
				}


}