﻿
function bringUpKudosKits(intSlot1,intSlot2,slot1,slot2,strImgUrl){var blnFound=false;for(i=0;i<=arrKudoKitData.length-1;i++){var arrData=arrKudoKitData[i].split('|');if(parseInt(arrData[2])==parseInt(intSlot1)){getElementId('tdImgSlot1').style.display="inline";getElementId(_strCPId+'imgSlot1').src=strImgUrl.replace("EXTCODE",arrData[1]);getElementId(_strCPId+'imgSlot1').alt=arrData[0]+' - '+arrData[1];getElementId(_strCPId+'hidKitInvtId1').value=arrData[0];getElementId(_strCPId+'hidKitExtCode1').value=arrData[1];getElementId(_strCPId+'imgSlot1').style.display="inline";blnFound=true}else if(parseInt(arrData[2])==parseInt(intSlot2)){getElementId('tdImgSlot2').style.display="inline";getElementId(_strCPId+'imgSlot2').src=strImgUrl.replace("EXTCODE",arrData[1]);getElementId(_strCPId+'imgSlot2').alt=arrData[0]+' - '+arrData[1];getElementId(_strCPId+'hidKitInvtId2').value=arrData[0];getElementId(_strCPId+'hidKitExtCode2').value=arrData[1];getElementId(_strCPId+'imgSlot2').style.display="inline";blnFound=true;break}}slot1.value=intSlot1;slot2.value=intSlot2;var kitinvtid=_strCPId+'hidKitInvtId1';var invtid=_strCPId+'hidInvtId';var kitimg=_strCPId+'hidKitImg';var extcode=_strCPId+'hidKitExtCode1';if(blnFound){getElementId('tblKudosKits').style.display="inline";displayProducts(kitinvtid,invtid,kitimg,extcode);}}function clearSlots(){getElementId('tblKudosKits').style.display="none";for(i=1;i<=2;i++){getElementId('tdImgSlot'+i).style.display="none";getElementId(_strCPId+'imgSlot'+i).style.display="none";getElementId(_strCPId+'imgSlot'+i).src="";getElementId(_strCPId+'imgSlot'+i).alt=""}}function clearItems(){getElementId('tblProducts').style.display="none";for(i=1;i<=5;i++){getElementId('tdProd'+i).style.display="none";getElementId('imgProd'+i).src="";getElementId('imgProd'+i).alt=""}var spnKudosTitle=getElementId('spnKudosTitle');var lnkKudosAll=getElementId('lnkKudosAll');spnKudosTitle.innerHTML="";lnkKudosAll.innerHTML=""}function previousKits(slot1,slot2,imgLeft,imgRight,currpage,totalpages,numofslides){slot1=getElementId(slot1);slot2=getElementId(slot2);imgLeft=getElementId(imgLeft);imgRight=getElementId(imgRight);var imgLeftDisabled=getElementId(_strCPId+'imgLeftDisabled');var imgRightDisabled=getElementId(_strCPId+'imgRightDisabled');currpage=getElementId(currpage);totalpages=getElementId(totalpages);var strImgUrl=getElementId(_strCPId+'hidKitImg').value;var intSlot2=parseInt(slot2.value)-2;var intSlot1=parseInt(intSlot2)-1;clearItems();clearSlots();imgRight.style.display="inline";imgRightDisabled.style.display="none";getElementId(_strCPId+'hidInvtId').value="";if(parseInt(intSlot1)<=parseInt(1)){intSlot1=1;imgLeft.style.display="none";imgLeftDisabled.style.display="inline"}if(parseInt(intSlot2)<=2){imgLeft.style.display="none";imgLeftDisabled.style.display="inline";intSlot2=2}bringUpKudosKits(intSlot1,intSlot2,slot1,slot2,strImgUrl);}function nextKits(slot1,slot2,imgLeft,imgRight,currpage,totalpages,numofslides){clearItems();clearSlots();slot1=getElementId(slot1);slot2=getElementId(slot2);imgLeft=getElementId(imgLeft);imgRight=getElementId(imgRight);var imgLeftDisabled=getElementId(_strCPId+'imgLeftDisabled');var imgRightDisabled=getElementId(_strCPId+'imgRightDisabled');currpage=getElementId(currpage);totalpages=getElementId(totalpages);var strImgUrl=getElementId(_strCPId+'hidKitImg').value;var intSlot1=parseInt(slot2.value)+1;var intSlot2=parseInt(slot2.value)+2;getElementId(_strCPId+'hidInvtId').value="";imgLeft.style.display="inline";imgLeftDisabled.style.display="none";if(parseInt(intSlot1)>=parseInt(numofslides)){intSlot1=numofslides;imgRight.style.display="none";imgRightDisabled.style.display="inline";intSlot2=numofslides}if(parseInt(intSlot2)>=parseInt(numofslides)){imgRight.style.display="none";imgRightDisabled.style.display="inline";intSlot2=numofslides}bringUpKudosKits(intSlot1,intSlot2,slot1,slot2,strImgUrl);}function quickView(invtid,extcode){invtid=getElementId(invtid).value;extcode=getElementId(extcode).value;openRadWindow('/qv/'+invtid+'/'+escape(extcode+"þ"+invtid)+'/cheerskit',650,850,1,0,1,1,'0');}function mouseOnOff(onoff,num){var hidInvtId=getElementId(_strCPId+'hidInvtId');var strImgUrl=getElementId(_strCPId+'hidScene7').value+"IMG?hei=140&wid=140&op_sharpen=1";var strImgSrc="";var strImgAlt="";if(hidInvtId.value.length>0){switch(onoff){case'on':strImgSrc=strImgUrl.replace("IMG",hidInvtId.value+'_'+num+'_ON');break;case'off':strImgSrc=strImgUrl.replace("IMG",hidInvtId.value+'_'+num+'_OFF');break}getElementId('imgProd'+num).src=strImgSrc}}function displayProducts(kitinvtid,invtid,kitimg,extcode){var strImgUrl=getElementId(_strCPId+'hidScene7').value+"IMG?hei=140&wid=140&op_sharpen=1";var strCaption="";var spnKudosTitle=getElementId('spnKudosTitle');var lnkKudosAll=getElementId('lnkKudosAll');kitinvtid=getElementId(kitinvtid);invtid=getElementId(invtid);kitimg=getElementId(kitimg);extcode=getElementId(extcode);clearItems();var lngCount=0;for(i=0;i<=arrKudoSlotData.length-1;i++){var arrSlotItems=arrKudoSlotData[i].split('|');if(arrSlotItems.length>0){if(kitinvtid.value==arrSlotItems[0]){lngCount++;getElementId('imgProd'+lngCount).src=strImgUrl.replace("IMG",kitinvtid.value+'_'+lngCount+'_OFF');getElementId('imgProd'+lngCount).alt=kitinvtid.value+' - CHEERS NOTE: '+arrSlotItems[3];getElementId('spnProdName'+lngCount).innerHTML='CHEERS NOTE: '+arrSlotItems[3];getElementId('tdProd'+lngCount).style.display="inline"}if(lngCount>5){break}}}getElementId('tblProducts').style.display="inline";invtid.value=kitinvtid.value;for(x=0;x<=arrKudoKitData.length-1;x++){var arrData=arrKudoKitData[x].split('|');if(arrData[1]==extcode.value){spnKudosTitle.innerHTML=arrData[3]+' | '+arrData[4];lnkKudosAll.href=arrData[5];lnkKudosAll.innerHTML=arrData[6];break}}}function bringUpSlides(strDirection){switch(strDirection){case'left':break;case'right':break}}
