// JavaScript Document

var itemContemporary = '';

var itemDebute = '';

var itemChampion = '';

var itemDiamond = '';

var countCon = 1;

var countDe = 1;

var countCham = 1;

var countDia = 1;

var detailCon = '';



	window.addEvents({
		'domready': function(){
			/* thumbnails example , div containers */
			new SlideItMoo({
						overallContainer: 'SlideItMoo_outer',
						elementScrolled: 'SlideItMoo_inner',
						thumbsContainer: 'SlideItMoo_items',		
						itemsVisible:2,
						itemsSelector: '.SlideItMoo_element',
						itemWidth:168,
						showControls:1});
		}
	});



	window.addEvents({
		'domready': function(){
			/* thumbnails example , div containers */
			new SlideItMoo({
						overallContainer: 'SlideItMoo_outer2',
						elementScrolled: 'SlideItMoo_inner2',
						thumbsContainer: 'SlideItMoo_items2',		
						itemsVisible:2,
						itemsSelector: '.SlideItMoo_element',
						itemWidth: 168,
						showControls:1});
		}
	});



	window.addEvents({
		'domready': function(){
			/* thumbnails example , div containers */
			new SlideItMoo({
						overallContainer: 'SlideItMoo_outer3',
						elementScrolled: 'SlideItMoo_inner3',
						thumbsContainer: 'SlideItMoo_items3',		
						itemsVisible:2,
						itemsSelector: '.SlideItMoo_element',
						itemWidth: 168,
						showControls:1});
		}
	});




	window.addEvents({
		'domready': function(){
			/* thumbnails example , div containers */
			new SlideItMoo({
						overallContainer: 'SlideItMoo_outer4',
						elementScrolled: 'SlideItMoo_inner4',
						thumbsContainer: 'SlideItMoo_items4',		
						itemsVisible:2,
						itemsSelector: '.SlideItMoo_element',
						itemWidth: 168,
						showControls:1});
		}
	});


var current = 'Contemporary';
var test="";


function switch_service(id) {
	document.getElementById(current).style.display = 'none';
	document.getElementById(id).style.display = 'block';
	current = id;

       var product_to_show = 'product_' + current;        
       product_to_show = document.getElementById(product_to_show).value;

	if(test != "")
		document.getElementById(test).style.display = 'none';

       test = product_to_show;
       document.getElementById(product_to_show).style.display = 'block';
	return false;
}
function init_service() {
	//qs = window.location.search.substring(1);
	//if (qs) switch_service(qs);
	//else 
	//{
		 switch_service(current);
	//}
}


function addItemContemporary(fname, image, product_name)
{
	itemContemporary += "<div class="+'SlideItMoo_element'+" onclick=showdetailproduct('"+product_name+"') ><img src="+image+" />"+fname+"</div>";
	//alert(detail);
	//detailCon += "<div class="+'frame_product'+" id="+'contemporary_' + countCon + ">" + detail + "</div>";
}

function addItemDebute(fname, image, product_name)
{
	itemDebute += "<div class="+'SlideItMoo_element'+" onclick=showdetailproduct('"+product_name+"') ><img src="+image+" />"+fname+"</div>";
	//alert(item);
}

function addItemChampion(fname, image, product_name)
{
	itemChampion += "<div class="+'SlideItMoo_element'+" onclick=showdetailproduct('"+product_name+"') ><img src="+image+" />"+fname+"</div>";
	//alert(itemChampion);
}

function addItemDiamond(fname, image, product_name)
{
	itemDiamond += "<div class="+'SlideItMoo_element'+" onclick=showdetailproduct('"+product_name+"') ><img src="+image+" />"+fname+"</div>";
	//alert(item);
}

function createScroller()
{
	var strContemporary = "<div id='SlideItMoo_outer'>"+

		"<div id='SlideItMoo_inner'>"+

		  "<div class='title_category'><img src='images/contemporary-smalllink.gif' alt='Contemporary' height='24' width='94' /></div>"+

		  "<div class='clr'></div>"+

		  "<div id='SlideItMoo_items'>" + itemContemporary +			

		  "</div>"+

		"</div>"+

	  "</div>";	 

	var strDebute = "<div id='SlideItMoo_outer2'>"+

		"<div id='SlideItMoo_inner2'>"+

		  "<div class='title_category'><img src='images/dubute-smalllink.gif' alt='Contemporary' height='24' width='94' /></div>"+

		  "<div class='clr'></div>"+

		  "<div id='SlideItMoo_items2'>" + itemDebute +			

		  "</div>"+

		"</div>"+

	  "</div>"+

	"</div>";

	var strChampion = "<div id='SlideItMoo_outer3'>"+

		"<div id='SlideItMoo_inner3'>"+

		  "<div class='title_category'><img src='images/champion-smalllink.gif' alt='Contemporary' height='24' width='94' /></div>"+

		  "<div class='clr'></div>"+

		  "<div id='SlideItMoo_items3'>" + itemChampion +			

		  "</div>"+

		"</div>"+

	  "</div>"+

	"</div>";

	var strDiamond = "<div id='SlideItMoo_outer4'>"+

		"<div id='SlideItMoo_inner4'>"+

		  "<div class='title_category'><img src='images/diamond-smallink.gif' alt='Diamond' height='24' width='94' /></div>"+

		  "<div class='clr'></div>"+

		  "<div id='SlideItMoo_items4'>" + itemDiamond +			

		  "</div>"+

		"</div>"+

	  "</div>"+

	"</div>";

	//alert(strContemporary);

	document.getElementById("contemporary_scroller").innerHTML = strContemporary; 
	
	document.getElementById("debute_scroller").innerHTML = strDebute;

	document.getElementById("champion_scroller").innerHTML = strChampion;

	document.getElementById("diamond_scroller").innerHTML = strDiamond;
}