function tollfree(){ var myDate = new Date(); var gmt = -myDate.getTimezoneOffset()/60; if(gmt == 5.5){ if(document.getElementById('tollfree')){ document.getElementById('tollfree').innerHTML = '0'+pns_no; } if(document.getElementById('tollfree1')){ document.getElementById('tollfree1').innerHTML = '0'+pns_no; } }else{ if(document.getElementById('tollfree')){ document.getElementById('tollfree').innerHTML = '+91-'+pns_no; } if(document.getElementById('tollfree1')){ document.getElementById('tollfree1').innerHTML = '+91-'+pns_no; } } }; /*scroller function start*/ var Imgs=[]; function ImgLoad(cls){ var as=zxcByClassName(cls); for (var z0=0;z0 < as.length;z0++) { if (as[z0].getElementsByTagName('IMG')[0].getAttribute('dataimg')&&as[z0].getElementsByTagName('IMG')[0]){ oop=new Fade(as[z0].getElementsByTagName('IMG')[0],as[z0].getElementsByTagName('IMG')[0].getAttribute('dataimg')); Imgs.push(oop); }else if(as[z0].getAttribute('dataimg')&&as[z0].getElementsByTagName('IMG')[0]){ oop=new Fade(as[z0].getElementsByTagName('IMG')[0],as[z0].getAttribute('dataimg')); Imgs.push(oop); } } CkTop();}; function CkTop(){ for (var z0=0;z0 < Imgs.length;z0++){ if (zxcPos(Imgs[z0].img)[1]< zxcWWHS()[1]+zxcWWHS()[3]&&Imgs[z0].opc==0){Imgs[z0].fade(); Imgs.splice(z0,1); z0--; }} }; function zxcWWHS(){ if (window.innerHeight) return [window.innerWidth-10,window.innerHeight-10,window.pageXOffset,window.pageYOffset]; else if (document.documentElement.clientHeight) return [document.documentElement.clientWidth-10,document.documentElement.clientHeight-10,document.documentElement.scrollLeft,document.documentElement.scrollTop]; return [document.body.clientWidth,document.body.clientHeight,document.body.scrollLeft,document.body.scrollTop]; };function zxcPos(obj){ var rtn=[0,0]; while(obj){ rtn[0]+=obj.offsetLeft; rtn[1]+=obj.offsetTop; obj=obj.offsetParent; } return rtn; };function zxcByClassName(nme,el,tag){ if (typeof(el)=='string') el=document.getElementById(el);el=el||document; ary=[]; if(nme != 'undefined'){ for (var tag=tag||'*',reg=new RegExp('\\b'+nme+'\\b'),els=el.getElementsByTagName(tag),z0=0; z0< els.length;z0++){if(reg.test(els[z0].className)) ary.push(els[z0]);}} return ary;};window.onscroll=CkTop; /*---------------search-------------------*/ function searchCheck(){ if(window.location.host=="showroom.indiamart.com"){ return false; }; var str = ''; if (document.frm.ss.value=='' || document.frm.ss.value=='Search Products/Services' || document.frm.ss.value.match(/^\s+$/)) { alert("Please enter some keyword to search."); document.frm.ss.focus();document.frm.ss.value='';return false; } if (document.frm.ss.value.length < 3) { alert("Please Enter atleast 3 character"); document.frm.ss.focus();document.frm.ss.value='';return false; } if (!(document.frm.ss.value.match(/\w/))){ alert("Enter at least one alphanumeric characters for search."); document.frm.ss.focus(); document.frm.ss.value=''; return false;} if (document.frm.ss.value) { var str1; str1 = document.frm.ss.value.replace(/^\s+/g, '').replace(/\s+$/g, ''); str1 = str1.replace(/\+/g, ' '); str1 = str1.replace(/\s+/g, '+'); str1 = str1.replace(/%/g, '%25'); str += 'ss='+str1; /* ------------ GOOGLE TRACK EVENT FOR SEARCH -------------------------------------- */ try{ _gaq.push(['b._trackEvent','Body','Searchbutton',''+PC_CLNT_TMPL_PATH+'']); }catch(e){} /* --------------------- GOOGLE TRACK EVENT FOR SEARCH -------------------------------------- */ window.location = PAID_SHOWROOM_URL+"search.html?"+str; return false; } } function searchClear(){if(document.frm.ss.value=="Search Products/Services"){document.frm.ss.value=""}} function settext(){if(document.frm.ss.value==""){document.frm.ss.value="Search Products/Services"}} function settextvalue(){document.frm.ss.value="Search Products/Services"} if(typeof PC_CLNT_TMPL_PATH != "undefined" && PC_CLNT_TMPL_PATH == 'd0051'){ function searchCheck1(){ if(window.location.host=="showroom.indiamart.com"){ return false; }; var str=''; if(document.frm1.ss1.value=='' || document.frm1.ss1.value=='Search Products/Services' || document.frm1.ss1.value.match(/^\s+$/)){ alert("Please enter some keyword to search."); document.frm1.ss1.focus(); document.frm1.ss1.value=''; return false;} if(document.frm1.ss1.value.length < 3){ alert("Please Enter atleast 3 character"); document.frm1.ss1.focus(); return false;} if (!(document.frm1.ss1.value.match(/\w/))){ alert("Enter at least one alphanumeric characters for search."); document.frm1.ss1.focus(); document.frm1.ss1.value=''; return false;} if(document.frm1.ss1.value){ var str1; str1=document.frm1.ss1.value.replace(/^\s+/g,'').replace(/\s+$/g,''); str1 = encodeURIComponent(str1); str1=str1.replace(/\+/g,' '); str1=str1.replace(/\s+/g,'+'); str+='ss='+str1; /* --------------------- GOOGLE TRACK EVENT FOR SEARCH ---------------------------- */ try{ _gaq.push(['b._trackEvent','Body','Searchbutton',''+PC_CLNT_TMPL_PATH+'']); }catch(e){} /* -------------------- GOOGLE TRACK EVENT FOR SEARCH --------------------------- */ window.location = PAID_SHOWROOM_URL+"search.html?"+str; return false;}}; function searchClear1(){ if(document.frm1.ss1.value=='Search Products/Services'){ document.frm1.ss1.value=''; }}; function settext1(){if(document.frm1.ss1.value==''){document.frm1.ss1.value='Search Products/Services';}}; function settextvalue1(){document.frm1.ss1.value='Search Products/Services';}; } function openchildts1(thisurl){ browserName = navigator.appName; browserVer = parseInt(navigator.appVersion); condition = !(( (browserName.indexOf("Explorer") >=0 ) && (browserVer < 4) ) || ((browserName.indexOf("Netscape") >=0 ) && (browserVer < 2) ) ) ; if (condition == true ) CanAnimate = true; else CanAnimate = false; if ( CanAnimate ) { var windowHeight; var windowWidth; var windowTop; var windowLeft; if (browserName == 'Microsoft Internet Explorer'){ windowWidth="550px"; }else{ windowWidth="553px"; } windowHeight=(screen.height*(80/100))*0.85; windowTop=(screen.height*(20/100))*0.8; windowLeft=screen.width*(40.2/100); msgWindow=window.open( '' ,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,top='+windowTop+',left='+windowLeft+',width='+windowWidth+',height='+windowHeight); msgWindow.focus(); msgWindow.location.href = thisurl; }else { msgWindow=window.open( thisurl,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=510,height=420'); } }; function Windowheight() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight)){ myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } return myHeight;} function offsettop(options) {core_strundefined = typeof undefined;var docElem, win,box = { top: 0, left: 0 },elem = options,doc = elem && elem.ownerDocument; if ( !doc ){ return; } docElem = doc.documentElement; if ( typeof elem.getBoundingClientRect !== core_strundefined ) {box = elem.getBoundingClientRect();} win = getWindow( doc ); return {top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )};}; function getWindow(elem){return (elem != null && elem == elem.window)?elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false;} function LoadImageinViewPort() { var windowTopvar = (window.pageYOffset!=undefined)?window.pageYOffset:window.document.documentElement.scrollTop; if (typeof jQuery == 'undefined') { var LazyImages = document.getElementsByTagName('img'); var imageLink = ""; for(i=0;i (parseInt(windowTopvar))) { if(LazyImages[i].getAttribute('dataimg')!=null && LazyImages[i].getAttribute('dataimg')!=""){ imageLink = LazyImages[i].getAttribute("dataimg"); }else if(LazyImages[i].parentNode.getAttribute('dataimg')!=null && LazyImages[i].parentNode.getAttribute('dataimg')!=""){ imageLink = LazyImages[i].parentNode.getAttribute("dataimg"); } if(imageLink!=""){ LazyImages[i].src = imageLink; } } } } else { jQuery("img[dataimg]").each(function () { if (parseInt(jQuery(this).offset().top) < (parseInt(windowTopvar) + parseInt(jQuery(window).height())+600) && (parseInt(jQuery(this).offset().top) + parseInt(jQuery(this).height())+600) > (parseInt(windowTopvar))) { if(this.getAttribute("dataimg")!= ""){ this.src = this.getAttribute("dataimg"); } } }); jQuery("a[dataimg] img").each(function () { if (parseInt(jQuery(this).offset().top) < (parseInt(windowTopvar) + parseInt(jQuery(window).height())+600) && (parseInt(jQuery(this).offset().top) + parseInt(jQuery(this).height())+600) > (parseInt(windowTopvar))) { jQuery(this).attr('src',jQuery(this).parent("a[dataimg]").attr("dataimg")); } }); } if (window.addEventListener) window.addEventListener("scroll", bindFunctionOnScroll, false); else if (window.attachEvent) window.attachEvent("onscroll", bindFunctionOnScroll); else window.onscroll = bindFunctionOnScroll; CkTop(); }; var timer; function bindFunctionOnScroll(){clearTimeout(timer);timer = setTimeout( LoadImageinViewPort , 150 );}; var arr;var str; function finder(arr,str){ var newArr = new Array(); for(var i=0;i h || width > w){ if(height > width){ var temp = height/h; var new_width = width / temp; new_width = parseInt(new_width); height = h; width = new_width; }else{ var temp = width/w; var new_height = height / temp; new_height = parseInt(new_height);height = new_height; width = w; } } Obj.height = height; Obj.width = width; }