function populateData(a,b){if(a=="1"){showTab(a)}else{if(a=="2"){showTab(a);if(b!=0){paging1()}}else{if(a=="3"){showTab(a)}else{if(a=="5"){showTab(a)}else{if(a=="6"){showTab(a)}}}}}}function showTab(b){if(dojo.byId("div"+b)){dojo.byId("div"+b).className="tabShow"}if(dojo.byId("tab"+b)){dojo.byId("tab"+b).className="changeTab"}for(var a=0;a<=7;a++){if(a!=b){if(dojo.byId("div"+a)){dojo.byId("div"+a).className="tabHide"}if(dojo.byId("tab"+a)){dojo.byId("tab"+a).className="mainmenubtn"}}}}var lastVideo=-1;function showVideo(b,c,a){dojo.byId("youvideo_"+b).style.display="block";dojo.byId("vTitle"+b).style.display="block";dojo.byId("vTitle"+b).innerHTML="<b>"+c+"</b><br/><br/>";if(a<2){dojo.byId("vd_"+b).style.height=a*280+"px";dojo.byId("vidSec").style.marginTop="-260px"}if(a==2){dojo.byId("vidSec").style.marginTop="-450px"}if(lastVideo!=-1){dojo.byId("youvideo_"+lastVideo).style.display="none";dojo.byId("vTitle"+lastVideo).style.display="none"}lastVideo=b}function getProductInfoPage(a){var b=dojo.byId("hideId").value;if(a=="1"){document.f1.action="productInfo.do?operation=getSpec&productId="+b+"&divId="+a;document.f1.submit()}else{if(a=="2"){document.f2.action="productInfo.do?operation=getSpec&productId="+b+"&divId="+a;document.f2.submit()}else{if(a=="3"){document.f3.action="productInfo.do?operation=getSpec&productId="+b+"&divId="+a;document.f3.submit()}}}closePopup()}function gotoProductDetailPage(c){var a=1;var d;for(var b=0;b<c.products.length;b++){d=c.products[b].productId}document.forms[0].action="productInfo.do?operation=getSpec&productId="+d+"&divId="+a;document.forms[0].submit()}function validate(a){if(a.searchText.value.length==0){a.searchText.focus();return false}}function showPopupforNoResult(){setFocus("searchText");var a=dojo.byId("resultHide").value;if(a!=null&&a=="No Results Found"){setFocus("searchText")}}function showPopup(){}function setFocus(a){dojo.byId(a).focus()}function closePopup(){dijit.byId("dialog1").hide()}function showLargeImage(a){dijit.byId("largeImage").show();dojo.byId("showImg").innerHTML="<img src="+a+" />"}function loginToFB(){FB.Connect.requireSession();return false}function publishFacebook(k,g,o,c,h){var e=true;var j=FB.Facebook.apiClient;var m=new FB.BatchSequencer();m.isParallel=false;var b=facebookTmpId;var p='<a href="http://www.shopnics.in/'+k+"-"+g+'/1-Overview.html">'+k+"</a>";var f;var d=j.friends_get(new Array(),m);var n={url:p,images:[{src:"http://www.shopnics.in"+o,href:"http://www.shopnics.in"+o}],spec:c,price:h};var l;var a=(j.users_hasAppPermission("read_stream",m));m.execute(function(){f=d.result;l=a.result;if(l!="1"){FB.Connect.showPermissionDialog("read_stream");FB.Connect.showFeedDialog(b,n)}else{FB.Connect.showFeedDialog(b,n)}})}function showConnectAlert(){alert("Pls Login using FB connect above and then enjoy this feature.");return}function submitCheckBox(){var c;if(counter==0){c=false}if(counter==1){c=false}if(c==false){alert("You have to select atleast 2 products to compare");return c}else{c=true}if(c==true){var a="";for(i=0;i<data.length;i++){var b=data[i];if(b!=undefined){if(a==""){a="/"+b}else{a=a+"/"+b}}}document.getElementById("compareLink").href=a+"/productCompare.html";return true}}var counter=0;var data=new Array();function enableCheckbox(g){var b="comp"+g;var f=new Array();var c=document.getElementById(b).checked;var e=document.getElementById(b).value;if(c==true){if(counter+1>4){alert("Can not compare more than 4 products at a time");return false}else{data[counter]=e;counter=counter+1;return true}}else{counter=counter-1;var a=0;for(i=0;i<data.length;i++){var d=data[i];if(d!=e){f[a]=d;a=a+1}}data=f;return true}}function resetCounter(){counter=0;data=new Array()};