


jQuery.fn.hint = function() {
	return this.each(function(){
		var t = $(this);
		var title = t.attr('title');
		if (title) {
			t.focus(function(){
				if (t.val() == title) {
				  t.val('');
				  t.removeClass('blur');
				}
			})
			t.blur(function(){
				if (t.val() == '') {
				  t.val(title);
				  t.addClass('blur');
				}
			})
			t.parents('form:first()').submit(function(){
				if (t.val() == title) {
					t.val('');
					t.removeClass('blur');
				}
			});
			t.blur();
		}
	})
}

function clearInputValue(inputBox)
{
	if (inputBox.defaultValue==inputBox.value)
	{
		inputBox.value = "";				
	}
}
function writeInputValue(inputBox, inputDefault)
{
	if (inputBox.value=="")
	{
		inputBox.value = inputDefault;				
	}
}

function hideCSDropDown(dropDownLink, dropDownLinkClass, dropDownPane, dropDownOverlay)
{	
	document.getElementById(dropDownLink).className	= dropDownLinkClass;
	document.getElementById(dropDownPane).style.visibility = 'hidden';
	document.getElementById("pipeLeft").style.visibility = 'visible';
	document.getElementById("pipeRight").style.visibility = 'visible';
	document.getElementById('localizationPaneShop2').style.visibility = 'hidden';
	document.getElementById('localizationPaneShop2').style.display= 'none';
}
function showCSDropDown(dropDownLink, dropDownLinkClass, dropDownPane, dropDownOverlay, showPipeLeft, showPipeRight)
{			
	document.getElementById(dropDownLink).className	= dropDownLinkClass+"ON";
	document.getElementById(dropDownPane).style.top =  '33px';
	document.getElementById(dropDownPane).style.visibility = 'visible';
	document.getElementById("localizationPaneCtry2").style.marginLeft  = 
		document.getElementById("localizationCtryLink").offsetWidth-1 + "px";
	document.getElementById('localizationPaneShop2').style.left  = 		
		document.getElementById("localizationShopLink").offsetWidth -1+ "px";
	document.getElementById('localizationPaneShop2').style.width = document.getElementById("localizationPaneShop").offsetWidth
		- document.getElementById("localizationShopLink").offsetWidth
		+"px";
		
	if (dropDownLink == 'localizationShopLink')
	{
		document.getElementById('localizationPaneShop2').style.visibility = 'visible';
		document.getElementById('localizationPaneShop2').style.display= 'block';
	}
	if (showPipeLeft)
	{
		document.getElementById("pipeLeft").style.visibility = 'visible';
	}
	else
	{
		document.getElementById("pipeLeft").style.visibility = 'hidden';
	}
	if (showPipeRight)
	{
		document.getElementById("pipeRight").style.visibility = 'visible';
	}
	else
	{
		document.getElementById("pipeRight").style.visibility = 'hidden';
	}
}


