<!-- 
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 = '/checkout.asp';
		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(imgUrl)
{
	if(MyWin!=null)
	{
		MyWin.close;
		MyWin=null;
	}
	
	MyWin=window.open("/ShowImage.asp?imgUrl=" + imgUrl ,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_sameAsBill').checked;
	} else IsShippingInformationDisableInCheckout = makeDisable

	// fullname
	var fullname = document.getElementById('ship_fullname');
	if(fullname != null) fullname.disabled = IsShippingInformationDisableInCheckout;
	
	// address
	var address = document.getElementById('ship_address');
	if(address != null) address.disabled = IsShippingInformationDisableInCheckout;	
	
	// city
	var city = document.getElementById('ship_city');
	if(city != null) city.disabled = IsShippingInformationDisableInCheckout;	

	// region
	var region = document.getElementById('ship_region');
	if(region != null) region.disabled = IsShippingInformationDisableInCheckout;	

	// postal code
	var postalCode = document.getElementById('ship_postalCode');
	if(postalCode != null) postalCode.disabled = IsShippingInformationDisableInCheckout;	

	// country
	var country = document.getElementById('ship_country');
	if(country != null) country.disabled = IsShippingInformationDisableInCheckout;	
}
//--------------------------------------------------------------------------

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];}}
}

//--------------------------------------------------------------------------
// --> 