			function hideAll (){
				
				var a = new Array('rateO', 'summaryO', 'opinfoO', 'featureO', 'photosO', 'mapO');
				for(var i=0; i < a.length; i++){
					if(document.getElementById(a[i]).style.display=='block'){
						document.getElementById(a[i]).style.display='none';
					}
				}
			}
			function renderRates(){
				try{	
					hideAll();
					setTimeout(function (){tab.InjectToDiv(0);}, 100);
					setTimeout(function (){tab.injectChildNodes();}, 5000);
					document.getElementById('rateO').style.display='block';					
				}catch(e){
					alert('render_rates yells an error'+ e.name + ' '+ e.message);
					return false;
				}
				return false;
			}
			function renderSummary(){
				try{
					hideAll();
					setTimeout(function (){tab.InjectToDiv(1);}, 100);
					setTimeout(function (){tab.injectChildNodes();}, 5000);
					document.getElementById('summaryO').style.display='block';
				}catch(e){
					alert('render_summary yells an error'+ e.name + ' '+ e.message);
					return false;
				}
				return false;
			} 
			function renderOpinfo(){
				try{	
					hideAll();
					document.getElementById('opinfoO').style.display='block';
				}catch(e){
					alert('render_opinfo yells an error'+ e.name + ' '+ e.message);
					return false;
				}
				return false;
			} 
			function renderFeature(){
				try{	
					hideAll();
					document.getElementById('featureO').style.display='block';
				}catch(e){
					alert('render_feature yells an error'+ e.name + ' '+ e.message);
					return false;
				}
				return false;
			}
			function renderPhotos(){
					
					hideAll();
					setTimeout(function (){tab.InjectToDiv(2);}, 100);
					setTimeout(function (){tab.injectChildNodes();}, 5000);
					document.getElementById('photosO').style.display='block';					
					if(photoloaded == false){
						$('.gallery_demo_unstyled').addClass('gallery_demo');	// adds new class name to maintain degradability
						photoloaded = true;
						$('.gallery_demo').galleria({
							history   : true,									// activates the history object for bookmarking, back-button etc.
							clickNext : true,									// helper for making the image clickable
							insert    : '#main_image',							// the containing selector for our main image
							onImage   : function(image,caption,thumb) {			// let's add some image effects for demonstration purposes
								
								// fade in the image & caption
								if(! ($.browser.mozilla && navigator.appVersion.indexOf("Win")!=-1) ) { // FF/Win fades large images terribly slow
									image.css('display','none').fadeIn(1000);
								}
								//caption.css('display','none').fadeIn(1000);
								
								// fetch the thumbnail container
								var _li = thumb.parents('li');
								
								// fade out inactive thumbnail
								_li.siblings().children('img.selected').fadeTo(500,0.3);
								
								// fade in active thumbnail
								thumb.fadeTo('fast',1).addClass('selected');

								
								// add a title for the clickable image
								image.attr('title','Next image >>');
							},
							onThumb : function(thumb) { // thumbnail effects goes here
								
								// fetch the thumbnail container
								var _li = thumb.parents('li');
								
								// if thumbnail is active, fade all the way.
								var _fadeTo = _li.is('.active') ? '1' : '0.3';
								
								// fade in the thumbnail when finnished loading
								thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
								
								// hover effects
								thumb.hover(
									function() { thumb.fadeTo('fast',1); },
									function() { _li.not('.active').children('img').fadeTo('fast',0.3); } // don't fade out if the parent is active
								)
							}
						});
					}



			} 
			function renderMapsv2(){
				try{
					if(typeof(GMap2)!='undefined'){
						if(GBrowserIsCompatible() && maploaded==false){

							var geocoder = new GClientGeocoder();
							if (geocoder) {

									geocoder.getLatLng(address, function(point) {
										if (!point){  
											alert(address + " not found"); return false;       
										} else {
											var map = new GMap2(document.getElementById("map_canvas"));
											var marker = new GMarker(point);
											map.setCenter(point, 17);
											map.addOverlay(marker);
											marker.openInfoWindow('<h5 class="mapTitle">'+thisproductname+'</h5>'+street, {maxWidth:300});
											GEvent.addListener(marker,'mouseover',function(){marker.openInfoWindowHtml('<h5 class="mapTitle"><?=$p->productName?></h5>'+street, {maxWidth:300});});
											map.setUIToDefault();
										}
									  }
									);

							}
							maploaded=true;
							window.clearInterval(itime);
						}//GBrowserIsCompatible
					}else{
						window.clearInterval(itime);
						if(itime)
							window.clearInterval(itime);
						itime = window.setInterval('renderMaps()', 200);
					}

				}catch(e){
					alert('renderMapsv2 yells an error' + e.name + ' ' + e.message); return false;
				}
				return false;
			}
			function renderMaps(){
				try{	
					hideAll();
					setTimeout(function (){tab.InjectToDiv(3);}, 100);
					setTimeout(function (){tab.injectChildNodes();}, 5000);
					document.getElementById('mapO').style.display='block';
					if(typeof(GMap2)!='undefined'){
					if(plat==0 && plong==0) {
						renderMapsv2();
						return;
					}
					if(maploaded==false){
						
						  if (GBrowserIsCompatible()){

								var l = new GLatLng(plat, plong);
								var map = new GMap2(document.getElementById("map_canvas"));
								map.setCenter(l, 17);
								var marker = new GMarker(l);
								map.addOverlay(marker);
								marker.openInfoWindow('<h5 class="mapTitle">'+thisproductname+'</h5>'+street, {maxWidth:300});
								GEvent.addListener(marker,'mouseover',function(){marker.openInfoWindowHtml('<h5 class="mapTitle"><?=$p->productName?></h5>'+street, {maxWidth:300});});
								map.setUIToDefault();
						  }

					}
						maploaded = true;
						window.clearInterval(itime);
					}else{
						if(itime)
							window.clearInterval(itime);
						itime = window.setInterval('renderMaps()', 200);
					}
				}catch(e){
					alert('render_maps yells an error'+ e.name + ' '+ e.message);
					return false;
				}
				return false;
			}