ea=document;ef=ea.URL;ko=isNaN;vt=undefined;
function detailsPopup(itemNo){popFixedWin("cr_1b_dp.htm?itemno="+itemNo,450,485);}

function popFixedWin(url,w,h){nwin=open(url,'newwin','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+w+',height='+h);nwin.focus();}

function UpdateCategory(){obj_brand=ea.searchform.brand;obj_cat=ea.searchform.category;if(obj_brand.selectedIndex!=0){obj_cat.selectedIndex=1}GoSearch();}

function UpdateBrand(){obj_brand=ea.searchform.brand;obj_cat=ea.searchform.category;if(obj_cat.selectedIndex!=1){obj_brand.selectedIndex=0;GoSearch();}}

function GoSearch(){obj_brand=ea.searchform.brand;obj_cat=ea.searchform.category;obj_point=ea.searchform.point;location.href="cr_1b_sr.htm?"+"brand="+obj_brand.selectedIndex+"&cat="+obj_cat.selectedIndex+"&point="+obj_point.selectedIndex}

function updateFlash(){var idx=ef.indexOf('?');var params=new Array();brand_index=0;cat_index=0;point_index=0;if(idx!=-1){var pairs=ef.substring(idx+1,ef.length).split('&');for(var i=0;i<pairs.length;i++){nameVal=pairs[i].split('=');if(nameVal[0]=="brand")if(nameVal[1]!=""&&!ko(nameVal[1]))brand_index=nameVal[1];if(nameVal[0]=="cat")if(nameVal[1]!=""&&!ko(nameVal[1]))cat_index=nameVal[1];if(nameVal[0]=="point")if(nameVal[1]!=""&&!ko(nameVal[1]))point_index=nameVal[1]}}obj_brand=ea.searchform.brand;obj_cat=ea.searchform.category;obj_point=ea.searchform.point;obj_brand.selectedIndex=brand_index;obj_cat.selectedIndex=cat_index;obj_point.selectedIndex=point_index;if(ea.flash_rewards==vt){mw[0].SetVariable("byCategory",obj_cat.options[cat_index].value);mw[0].SetVariable("byBrand",obj_brand.options[brand_index].value);mw[0].SetVariable("byPoints",obj_point.options[point_index].value);}else{ea.flash_rewards.SetVariable("byCategory",obj_cat.options[cat_index].value);ea.flash_rewards.SetVariable("byBrand",obj_brand.options[brand_index].value);ea.flash_rewards.SetVariable("byPoints",obj_point.options[point_index].value);}}

//function loadVars(){var strParam=new String();strParam=ea.location.href;var strItemno=strParam.substring(strParam.indexOf("?play=")+6,strParam.length);if(ea.flash_rewards_pop==vt){mw[0].SetVariable("selectedItemno",strItemno);}else{ea.flash_rewards_pop.SetVariable("selectedItemno",strItemno);}}
function loadVars(){var strParam=new String();strParam=ea.location.href;var strItemno=strParam.substring(strParam.indexOf("?play=")+6,strParam.indexOf("?play=")+9);if(ea.flash_rewards_pop==vt){mw[0].SetVariable("selectedItemno",strItemno);}else{ea.flash_rewards_pop.SetVariable("selectedItemno",strItemno);}}
function loadVars2(){var strParam2=new String();strParam2=ea.location.href;var strItemno2=strParam2.substring(strParam2.indexOf("&continue1=")+11,strParam2.indexOf("&continue1=")+14);if(ea.flash_rewards_pop==vt){mw[0].SetVariable("selectedItemno2",strItemno2);}else{ea.flash_rewards_pop.SetVariable("selectedItemno2",strItemno2);}}
function loadVars3(){var strParam3=new String();strParam3=ea.location.href;var strItemno3=strParam3.substring(strParam3.indexOf("&soundpos=")+10,strParam3.length);if(ea.flash_rewards_pop==vt){mw[0].SetVariable("selectedItemno3",strItemno3);}else{ea.flash_rewards_pop.SetVariable("selectedItemno3",strItemno3);}}