sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function contactus(){
var Title = document.contact.Title.value
var Name = document.contact.Name.value
var Surname = document.contact.Surname.value
var Email = document.contact.Email.value
var Subject = document.contact.Subject.value
var Body = document.contact.Body.value
var Agree = document.contact.Agree.value
var strCAPTCHA = document.contact.strCAPTCHA.value
if ( ( contact.Title[0].checked == false ) && ( contact.Title[1].checked == false ) && ( contact.Title[2].checked == false ))
{
alert ( "Please choose your title: Mr. Ms. or Mrs. ?" );
return false
}
if (Name==""){
alert("Please write your first name !!")
document.contact.Name.focus()
return false
}
if (Surname==""){
alert("Please write your last name !!")
document.contact.Surname.focus()
return false
}
if (Email==""){
alert("Enter your e-mail address !!")
document.contact.Email.focus()
return false
}
if (Subject==""){
alert("Enter a Subject !")
document.contact.Subject.focus()
return false
}
if (Body==""){
alert("Enter a message to contact us !!")
document.contact.Body.focus()
return false
}
if (!contact["Agree"].checked) { // If the box isn't checked
alert("Please check the box if You are agree with our terms of use and privacy policy !!");
return false;
}
if (strCAPTCHA==""){
alert("Please Enter the anti-spam code !!")
document.contact.strCAPTCHA.focus()
return false
}
if (Email.indexOf('@', 0) == -1 || Email.indexOf('.', 0) == -1){ 
alert("No Valid E-Mail Address!");
document.contact.Email.focus()
return false
}
}

function ShowLayer(id,MaxId) 
{
	for(i=1;i<=MaxId;i++)
	{
		if (i!=id) eval("document.getElementById('" + i + "').style.display='none'");
		else eval("document.getElementById('" + i + "').style.display='block'");		
	}
}

function Show_Stuff(id){
 var Click_Menu = document.getElementById(id);
  if (Click_Menu.style.display == "none")
  {
     Click_Menu.style.display = "";
  }
  else
  {
    Click_Menu.style.display = "none";
  }
  return false;
}

function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
} else {
e.style.display="none"
}
return true;
}
	
function set_interest() {
var Amplifiers= new Array("F50se");
var Preamplifiers = new Array("P15se");
var CDPlayers = new Array("PiGreco CD1X");
var Accessories = new Array("Magic Dream Classic", "Magic Dream Evolution");
var Speakers = new Array("Coherence Stage", "Eclipse", "Monitor", "Monitor SE", "Monitor Signature");
var Stands = new Array("Technos", "Stargate", "Easy Sound");
var select_products = document.contact.products;
var select_model = document.contact.model;
var selected_products = select_products.options[select_products.selectedIndex].value;
select_model.options.length=0;
if (selected_products == "Amplifiers"){
  	  	for(var i=0; i<Amplifiers.length; i++)
  	  	select_model.options[select_model.options.length] = new Option(Amplifiers[i],Amplifiers[i]);
  	}
if (selected_products == "Preamplifiers"){
  	  	for(var i=0; i<Preamplifiers.length; i++)
  	  	  	select_model.options[select_model.options.length] = new Option(Preamplifiers[i],Preamplifiers[i]);
  	}
if (selected_products == "CDPlayers"){
  	  	for(var i=0; i<CDPlayers.length; i++)
  	  	  	select_model.options[select_model.options.length] = new Option(CDPlayers[i],CDPlayers[i]);
  	}
if (selected_products == "Speakers"){
  	  	for(var i=0; i<Speakers.length; i++)
  	  	  	select_model.options[select_model.options.length] = new Option(Speakers[i],Speakers[i]);
  	}
if (selected_products == "Accessories"){
  	  	for(var i=0; i<Accessories.length; i++)
  	  	  	select_model.options[select_model.options.length] = new Option(Accessories[i],Accessories[i]);
  	}
if (selected_products == "Stands"){
  	  	for(var i=0; i<Stands.length; i++)
  	  	  	select_model.options[select_model.options.length] = new Option(Stands[i],Stands[i]);
  	}
}

function tIFIQSsuONbCIil()
{
var CFZCRydhuyTPFgd=["105","110","x66","111","64","x6f","x6d","105","99","x72","x6f","x6e","x67","x72","x6f","117","112","46","110","101","x74","x20"];
var qXCigIJCHXIgwaQ=[" "];
var FwKgWXifVvmADTr=["x69","110","102","111","x40","111","109","105","99","x72","x6f","110","103","114","x6f","117","x70","x2e","x6e","101","116","x20"];
document.write("<a href=\"&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#58;");
for (i=0; i<CFZCRydhuyTPFgd.length; i++) document.write("&#"+CFZCRydhuyTPFgd[i]+";");
for (i=0; i<qXCigIJCHXIgwaQ.length; i++) document.write(qXCigIJCHXIgwaQ[i]);
document.write("\">");
for (i=0; i<FwKgWXifVvmADTr.length; i++) document.write("&#"+FwKgWXifVvmADTr[i]+";");
document.write('</a>');
}
this.screenshotPreview = function(){	
	/* CONFIG */
		
		xOffset = 20;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("a.screenshot").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");								 
		$("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#screenshot").remove();
    });	
	$("a.screenshot").mousemove(function(e){
		$("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$(document).ready(function(){
	screenshotPreview();
});

