
		/*-------------------------------------------------------------------*/
		/* JAVASCRIPT														 */ 
		/*-------------------------------------------------------------------*/
	
		function aboutSite()
		{
			var str = "/common_code/aboutSite.php";				
			wnd = window.open(str,"aboutSite",
					"height=630, width=820, status, top, left, resizable, scrollbars, dependent");
			wnd.focus();
		}
		function aboutEshop()
		{
			var str = "/help/aboutEshop.php";				
			wnd = window.open(str,"aboutEshop",
					"height=630, width=820, status, top, left, resizable, scrollbars, dependent");
			wnd.focus();
		}
		function aboutBuying()
		{
			var str = "/common_code/aboutBuying.php";				
			wnd = window.open(str,"aboutBuying",
					"height=630, width=820, status, top, left, resizable, scrollbars, dependent");
			wnd.focus();
		}
		function secured_purchase ()
		{
			var str = "/product/secured_purchase.php";				
			wnd = window.open(str,"secured_purchase",
					"height=630, width=820, status, top, left, resizable, scrollbars, dependent");
			wnd.focus();
		}
		function aboutCreateEshop()
		{			
			location.href="/eshop/eshop.php";
		}
		function aboutQualify()
		{			
			var str = "/infoQualify/infoQualify.php";	
			window.open(str,"_blank");
		}
		function aboutProhibited()
		{			
			var str = "/infoProhibited/infoProhibited.php";	
			window.open(str,"_blank");
		}
		
		function aboutPagSeguro()
		{			
			//window.open("http://www.brpay.com.br/?ind=407036","_blank");
			window.open("https://pagseguro.uol.com.br/defaultbr.aspx?ind=407036","_blank");
		}
		function aboutPayPal()
		{			
			window.open("https://www.paypal.com/row/mrb/pal=B2FY4PDNG4VKY","_blank");
		}
		function pcComputers_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=14&subCat1=2&photo=1";				
		}
		function pcMultimidia_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=14&subCat1=4&photo=1";				
		}
		function pcComponents_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=14&subCat1=6&photo=1";				
		}
		function pcHardDisk_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=14&subCat1=3&photo=1";				
		}
		function pcMonitor_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=14&subCat1=8&photo=1";				
		}
		function pcNotebook_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=14&subCat1=9&photo=1";				
		}
		function pcPrinters_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=14&subCat1=7&photo=1";				
		}
		
		function mp3Player_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=13&subCat1=13&photo=1";				
		}
		function perfume_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=6&subCat1=4&photo=1";				
		}
		function book_page()
		{			
			location.href= "/livro.php";				
		}
		function tenis_page()
		{			
			location.href= "/search/search.php?searchTxt=tenis|sapatenis&mainCat=23&catgLevel=1";				
		}
		function site_partner()
		{			
			location.href= "/site_partner/site_partner.php";				
		}
		function aboutSkype()
		{			
			window.open("http://www.skype.com/intl/pt/helloagain.html","_blank");			
		}
		function aboutGoogle_video()
		{			
			window.open("http://video.google.com/?hl=en&tab=wv&q=","_blank");			
		}
		function aboutYahoo_video()
		{			
			window.open("http://video.yahoo.com/","_blank");			
		}
		function aboutYouTube_video()
		{			
			window.open("http://www.youtube.com/","_blank");			
		}
		function cellPhone_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=24&subCat1=4&photo=1";				
		}
		function digiCamera_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=9&subCat1=4&photo=1";				
		}
		function dvdPlayer_byCatg()
		{			
			location.href= "/search/search.php?catgLevel=2&from_app=searchByCatg/searchByCatg&orderBy=1&mainCat=13&subCat1=2&photo=1";				
		}
		function aboutSelling()
		{
			var str = "/common_code/aboutSelling.php";				
			wnd = window.open(str,"aboutSelling",
					"height=630, width=820, status, top, left, resizable, scrollbars, dependent");
			wnd.focus();
		}

		function submitSearchBt()
		{	
		
			var searchOption = document.getElementById("searchOption").value;		
			
			searchOption = (searchOption == 0) ? "" : searchOption;
			
			var searchTxt = document.getElementById("searchTxt_input").value;
			
			catgLevel = "";

			if (searchOption > 0)			// catg option
			{
				catgLevel = 1;
			}
			
			url_mainCat = (searchOption == "") ? "" : 
								"&mainCat="+searchOption; 
			url_catgLevel = (catgLevel == "") ? "" : 
								"&catgLevel="+catgLevel; 
			
			location.href = "/search/search.php?searchTxt="+ searchTxt +
				url_mainCat + url_catgLevel;
		
		}
	/*
		function setSearch()
		{
			//document.sendFields.goto_app.value = 'search';
			//document.sendFields.goto_app.value = 'search';
			document.getElementById("goto_app").value = 'search';
		}
	*/
		function searchTxt_update(searchTxt)
		{			
			//document.sendFields.searchTxt.value = searchTxt.value;
			document.getElementById("searchTxt").value = searchTxt.value;
		}
		
		function init()
		{
			
			//var special_fixed_price_on = document.getElementById("special_fixed_price_on").value;
			//var block_special_fixed_price = document.getElementById("special_fixed_price");
			
			// last sales
			var last_sales_on = document.getElementById("last_sales_on").value;
			var block_last_sales = document.getElementById("div_last_sales");
			
			// video ads list
			//var video_ads_on = document.getElementById("video_ads_on").value;
			//var block_video_ads = document.getElementById("video_ad_div");
			
			// last prod ads list
			var last_prod_ads_on = document.getElementById("last_prod_ads_on").value;
			var block_last_prod_ads = document.getElementById("div_last_prod_ads");

			
			//var special_auction_price_on = document.getElementById("special_auction_price_on").value;
			//var block_special_auction_price = document.getElementById("special_auction_price");

			//var special_products_on = document.hiddenFields.special_products_on.value;
			var special_products_on = document.getElementById("special_products_on").value;
			var block_special_products = document.getElementById("special_items_division");
			
			//var promotion_products_on = document.hiddenFields.promotion_products_on.value;
			var promotion_products_on = document.getElementById("promotion_products_on").value;
			var block_promotion_products = document.getElementById("promotion_products_division");

/*
			if (special_fixed_price_on == "1")
			{				
				block_special_fixed_price.style.display = "block";
			}
			else
			{
				block_special_fixed_price.style.display = "none";
			}
*/		
			if (last_prod_ads_on == "1")
			{				
				block_last_prod_ads.style.display = "block";
			}
			else
			{
				block_last_prod_ads.style.display = "none";
			}
/* OFF		
			if (video_ads_on == "1")
			{				
				block_video_ads.style.display = "block";
			}
			else
			{
				block_video_ads.style.display = "none";
			}
*/
			if (last_sales_on == "1")
			{				
				block_last_sales.style.display = "block";
			}
			else
			{
				block_last_sales.style.display = "none";
			}
/* OFF
			if (special_auction_price_on == "1")
			{				
				block_special_auction_price.style.display = "block";
			}
			else
			{
				block_special_auction_price.style.display = "none";
			}
*/


			if (special_products_on == "1")
			{				
				block_special_products.style.display = "block";
			}
			else
			{
				block_special_products.style.display = "none";
			}

			if (promotion_products_on == "1")
			{				
				block_promotion_products.style.display = "block";
			}
			else
			{
				block_promotion_products.style.display = "none";
			}
			
			// 1% of probability of this ad happening ...
			//if (document.hiddenFields.vertical_scroll_ad_on.value == '1')
			if (document.getElementById("vertical_scroll_ad_on").value == '1')
			{
				onad();
			}
			
		}		
		
