﻿function showetwproinfo(setLanguage,ct)
{
	
	var category_pl
	if(ct==undefined || ct==null)
	{
		var category_pl=top.location.href.indexOf("&ct=")+4
		ct=top.location.href.substr(category_pl)
		ct=ct.replace(/%20/g," ")
if(window.ActiveXObject){
		var product_category_title=document.getElementById("product_category_title")
}
		if(top.location.href.indexOf("&ct=")>=1)
		{
			product_category_title.innerHTML=">>"+ct
			var myshowinfo=document.getElementById("myshowinfo")
			myshowinfo.style.cssText="display:none;height:0px;line-height:0px;"
		}
		}
	if(setLanguage==undefined || setLanguage==null)
	{
		var language_pl=top.location.href.indexOf("?language=")+10
		setLanguage=top.location.href.substr(language_pl,2)
		}
	var temp_page_num
	var temp_title=top.location.href
	var temp_page_num_l=temp_title.indexOf("?pageNum=")
	
	var etw_temp_length=document.getElementsByTagName("item")
	var y=0;
	for(x=0;x<etw_temp_length.length;x++)
	{
		if(etw_temp_length[x].getAttribute("categories")==ct && etw_temp_length[x].getAttribute("languages")==setLanguage)
		{
		y=y+1
		}
		}
	var info=""
for(i=0;i<etw_temp_length.length;i++)
	{
		if(etw_temp_length[i].getAttribute("languages")==setLanguage && etw_temp_length[i].getAttribute("categories")==ct)
		{
			var img="<a href='eachinfo.html?"+etw_temp_length[i].getAttribute("id")+"'>"+"<img src='"+etw_temp_length[i].getAttribute("pic")+"' width='120' height='80' border='0' />"+"</a>"
		var gettitle="<a href='eachinfo.html?"+etw_temp_length[i].getAttribute("id")+"'>"+etw_temp_length[i].getAttribute("pro-title")+"</a>"
		var temp_info="<div class='etw_each_pro'>"+img+gettitle+"</div>"
		info=info+temp_info
		}
	}

	if(window.ActiveXObject)
{
	document.write("<div id='etw_product_2009'>"+info+"</div>")
}
	var etw_product_2009=document.getElementById("etw_product_2009")

}
function checkinfo()
{
	var getquery=top.location.href
	var getquery_place=getquery.indexOf("eachinfo.html?")+14
	var getquery_str=getquery.substr(getquery_place)
	var getid=document.getElementById(getquery_str)
	var h2=document.getElementById("eachinfo_title")						  
	h2.innerHTML=getid.getAttribute("pro-title")
	var eachinfo_pic=document.getElementById("eachinfo_pic")
	var temp_link="<a href='newproducts.html?language="+getid.getAttribute("languages")+"&ct="+getid.getAttribute("categories")+"'>"+getid.getAttribute("categories")+"</a>"
	var product_category_title=document.getElementById("product_category_title")
	product_category_title.innerHTML=">>"+temp_link+">>"+getid.getAttribute("pro-title")
	eachinfo_pic.setAttribute("src",getid.getAttribute("pic"))
	var eachinfo_description=document.getElementById("eachinfo_description")
	eachinfo_description.innerHTML=getid.getAttribute("description")
	}

function resetetwinfo()
{
	var myshowinfo=document.getElementById("myshowinfo")
	myshowinfo.style.cssText="display:block;"	
	var etw_product_2009=document.getElementById("etw_product_2009")
	etw_product_2009.style.cssText="display:none;height:0px;line-height:0px;"
	}
