<!-- 
var MyWin;
var imgId = 0;

function element_redirection_by_value(sender)
{
	var url = '';
	
	if(document.getElementById(sender).value != null) url = document.getElementById(sender).value;
	window.location.href = url;
	//alert(url);
}
//--------------------------------------------------------------------------

function redirect(url)
{
	window.location.href = url;
}
//--------------------------------------------------------------------------

function formSubmit(targetForm)
{
	document.getElementById(targetForm).submit();
}
//--------------------------------------------------------------------------

function formSubmitAction(targetForm, action)
{
	document.getElementById(targetForm).action = action
	document.getElementById(targetForm).submit();
}
//--------------------------------------------------------------------------

function myBasketSubmit()
{
	var count;
	var i;
	var selected = false;
	
	count = document.getElementById('primaryCount').value;
	for(i=0;i<count;i++)
	{
		if(document.getElementById("sel_" + i).checked == true)
		{
			selected = true;
			break;
		}
	}
	
	if(selected == true)
	{
		document.getElementById('formMyBasket').action = '/checkoutCustomerInfo.asp?mode=step1';
		document.getElementById('formMyBasket').submit();
	}
	else
	{
		lang = document.getElementById('lang').value;
		if(lang == 'el')
		{	
			alert('Δεν είναι δυνατή η ολοκλήρωση της παραγγελίας, επιλέξτε τουλάχιστον ένα προϊόν.');
		}else alert('You can not check out, please select at least one product.');
	}
}
//--------------------------------------------------------------------------

function formSubmitOnReturnChar(e, targetForm)
{
	if(e.keyCode == 13) document.getElementById(targetForm).submit();
}
//--------------------------------------------------------------------------

function formSubmitByChangeElement(targetForm, elementName, elementValue)
{
	document.getElementById(elementName).value = elementValue;	
	document.getElementById(targetForm).submit();
}
//--------------------------------------------------------------------------

function MyBasketSubmit(mode, index)
{
	document.getElementById('mode').value = mode;	
	document.getElementById('productId').value = index;	
	document.getElementById('formMyBasket').submit();
}
//--------------------------------------------------------------------------

function hoverLang(sender)
{
	document.getElementById(sender).className = 'langimg_hover';
}
//--------------------------------------------------------------------------

function unhoverLang(sender)
{
	document.getElementById(sender).className = 'langimg';
}
//--------------------------------------------------------------------------

function changeOtherPhotoThumb(imgName, id)
{
	document.getElementById('imgOtherPhoto').src = '/files/thumb/' + imgName;
	imgId = id;
}
//--------------------------------------------------------------------------

function changeOtherPhoto(imgName, id)
{
	document.getElementById('imgOtherPhoto').src = '/files/' + imgName;
}

//--------------------------------------------------------------------------

function ShowScrollImage(prodId)
{
	if(MyWin!=null)
	{
		MyWin.close;
		MyWin=null;
	}
	
	MyWin=window.open("/ShowImage.asp?id=" + prodId + "&imgId=" + imgId,null,"height=600,width=800,status=no,toolbar=no,menubar=no,location=no,titlebar=no,resizable=yes,scrollbars=yes");
	MyWin.focus();	
}
//--------------------------------------------------------------------------

function ShippingInformationAvailabilityInCheckout(makeDisable)
{
	if(makeDisable == "none")
	{
		IsShippingInformationDisableInCheckout = !document.getElementById('ship_notSameAsBill').checked;
	} 
	else 
	{
		IsShippingInformationDisableInCheckout = makeDisable;
		document.getElementById('ship_notSameAsBill').checked = !makeDisable;
	}
	
	var bill_title = document.getElementById('div_bill_title');
	if (IsShippingInformationDisableInCheckout)
	{
		bill_title.innerHTML = jsSameAsBillTitle;
	}
	else
	{
		bill_title.innerHTML = jsNotSameAsBillTitle;
	}
	
	var display = "";
	if (IsShippingInformationDisableInCheckout) display = "none";
	
	// title
	var title = document.getElementById('tr_ship_title');
	if(title != null) title.style.display = display;	
	
	// fullname
	var fullname = document.getElementById('tr_ship_fullname');
	if(fullname != null) fullname.style.display = display;
	
	// address
	var address = document.getElementById('tr_ship_address');
	if(address != null) address.style.display = display;	
	
	// city
	var city = document.getElementById('tr_ship_city');
	if(city != null) city.style.display = display;	

	// region
	var region = document.getElementById('tr_ship_region');
	if(region != null) region.style.display = display;	

	// postal code
	var postalCode = document.getElementById('tr_ship_postalCode');
	if(postalCode != null) postalCode.style.display = display;	

	// country
	var country = document.getElementById('tr_ship_country');
	if(country != null) country.style.display = display;	
	
	// save as default
	var saveasdefault = document.getElementById('tr_ship_saveAsDef');
	if(saveasdefault != null) saveasdefault.style.display = display;	
	saveasdefault = document.getElementById('ship_saveAsDef');
	if(saveasdefault != null) saveasdefault.checked = false;
		
}
//--------------------------------------------------------------------------

function hoverCatImg(id)
{
	document.getElementById('catImg' + id).src = '/images/products-icons/orange/' + id + '.gif';
	document.getElementById('catCaption' + id).className = 'captionHovered';
}
//--------------------------------------------------------------------------

function unhoverCatImg(id)
{
	document.getElementById('catImg' + id).src = '/images/products-icons/' + id + '.gif';
	document.getElementById('catCaption' + id).className = 'caption';
}
//--------------------------------------------------------------------------

function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

//--------------------------------------------------------------------------
// --> 