var currentTab		= "but_prop";
var currentDiv	= "productDetailProperties";

var opts = // horizontal Dock with images expanding downwards in the vertical axis...
		  { align: 'middle'
		  // set the maximum minor axis (vertical) image dimension to 48px
		  , size: 60
		  // add labels..
		  , labels: true
		  // swap the GIF extension for PNG extension for the larger image...
		  , source: function(i){ return this.src.replace(/gif$/,'png'); }
		  };
jQuery(document).ready(function(){
  jQuery('#dock_menu').jqDock(opts);
});

function switchTab(div, tab) {
	document.getElementById(currentDiv).style.display 	= 'none';
	document.getElementById(div).style.display		= 'block';
	currentDiv	= div;
	document.getElementById(window.currentTab).style.backgroundColor 	= "#CCCCCC";
	document.getElementById("a_"+window.currentTab).style.color			= "#000000";
	document.getElementById(tab).style.backgroundColor					= "#666699";
	document.getElementById("a_"+tab).style.color						= "#FFFFFF";
	currentTab	= tab;
}

function changePic(image){
	var bigImage = document.getElementById('image_1');
	var smallImage = image;
	var big_imagesrc	= bigImage.src;
	//
	bigImage.src = smallImage.src;
	smallImage.src = big_imagesrc;
}

function loadModels(value){
}

function switchImage(id) {
	var smallImg	= document.getElementById('pi_'+id);
	var hiddenText	= document.getElementById('pt_'+id);
	var linkBigImg	= document.getElementById('link_big_image_lightbox');
	var bigImg		= document.getElementById('big_project_image');
	var showText	= document.getElementById('big_project_text');
	linkBigImg.href	= smallImg.src;
	bigImg.src = smallImg.src;
	showText.innerHTML	= hiddenText.innerHTML;
}

function getSearchValue(val)
{
	if( val != "" ) {
		val = val.replace(" ", "+");
		return val;
	} else {
		return "LEEG";
	} 
}

function checkValue(id, value) 
{
 	var input	= document.getElementById(id);
	if( input.value == value ) {
		input.style.color	 = "#000000";
		input.style.fontStyle = 'normal'; 
		input.value = '';
	} else {
		if( input.value == '' ) {
			input.style.color	 = "#666666";
			input.style.fontStyle = 'italic'; 
			input.value	= value;
		}
	}
}
		
/*function showLayer(id) {
	if( document.getElementById(id).style.display == 'block' ) {
		document.getElementById(id).style.display = 'none';
	} else {
		document.getElementById(id).style.display = 'block';
	}
}*/
