function openURL(Lang)
		{
			var url = window.location.href;
			var pos1 = url.indexOf(".com/") +5;
			var newurl = url.substring(0,pos1) + Lang + url.substring(pos1+5,url.length);
//			top.location.href = newurl;
			setTimeout("window.location.href ='"+newurl+"';",1000);
		}


	function isEmail(e)
	{
		if(e.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) {
			return true;
		} 
		else {
			return false;
		}
	}
	
	function validatemail()
	{
		//if (document.forms["contact"].all.yourname.value == ""){
		if (document.forms["contact"].yourname.value == ""){
			alert("Please fill out the form correctly, making sure a genuine e-mail address is submitted");
//			document.forms["contact"].all.yourname.focus();
			document.forms["contact"].yourname.focus();
			return;
		}
//		emailval= document.forms["contact"].all.youremail.value
		emailval= document.forms["contact"].youremail.value
		if (!isEmail(emailval)){
			alert("Please fill out the form correctly, making sure a genuine e-mail address is submitted");
//			document.forms["contact"].all.youremail.focus();
			document.forms["contact"].youremail.focus();
			return;
		}
		
		//replace return by <br> tag
		document.forms['contact'].msg2.value = document.forms['contact'].msg.value.replace(/\n/g,"<BR>");
		document.forms['contact'].action.value="1";
		document.forms['contact'].submit();		
	}

	function showimgspec(myid,code,myimages) {
		showimg(myid);
		colstring = "";
		myaimages = eval(myimages);
		if(myaimages.length > 0 ) {
			for(i=0; i<myaimages.length; i++) {
				colstring = colstring + writecolor(myaimages[i][0],myaimages[i][1],myimages);
			}
			if (code.length > 2) {
				color0 = code.substr(code.length-2,1);
			}
			colstring = "<DIV class=\"mainclassbold\">" + eval("T" + color0) + "</DIV>" + colstring;
		}
		colorsel.innerHTML =  colstring;			
	}
	
	function writecolor(id,code,allcolors) {
		if (code.length > 2) {
			color = code.substr(code.length-2,1);
		}
		colorhtml = "<img src=\"" + eval("G" + color + "DotImg") + "\" alt=\"" + eval("T" + color) + "\" onmouseover=\"this.style.cursor='pointer'\" onclick=\"showimgspec('" + id + "', '" + code + "','" + allcolors + "');\" >";
		return(colorhtml);
	}
	
	function showimg(id) {
		imglarge.innerHTML = "<img src=\"" + imgurl + "/245/" + id + ".jpg\" border=\"0\">";
		colorsel.innerHTML = "";
	}
	
	function getAnchorPosition(anchorname) {
		// This function will return an Object with x and y properties
		var useWindow=false;
		var coordinates=new Object();
		var x=0,y=0;
		// Browser capability sniffing
		var use_gebi=false, use_css=false, use_layers=false;
		if (document.getElementById) { use_gebi=true; }
		else if (document.all) { use_css=true; }
		else if (document.layers) { use_layers=true; }
		// Logic to find position
		if (use_gebi && document.all) {
			y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
			}
		else if (use_gebi) {
			var o=document.getElementById(anchorname);
			y=AnchorPosition_getPageOffsetTop(o);
			}
		else if (use_css) {
			y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
			}
		else if (use_layers) {
			var found=0;
			for (var i=0; i<document.anchors.length; i++) {
				if (document.anchors[i].name==anchorname) { found=1; break; }
				}
			if (found==0) {
				coordinates.y=0; 
				return coordinates;
				}
			y=document.anchors[i].y;
			}
		else {
			coordinates.y=0; 
			return coordinates;
			}
		coordinates.y=y;
		return coordinates;
		}
		
											
	function AnchorPosition_getPageOffsetTop (el) 
		{
		var ot=el.offsetTop;
		while((el=el.offsetParent) != null) { ot += el.offsetTop; }
		return ot;
		}		

	
	function GetHeight(name) 
		{
		var c = getAnchorPosition(name);
		return c.y;
		}