
<!-- // Hide script from older browsers 

//Ad to favorites Function
//usage:  javascript:addToFavorites('urlAddress','pageName');
var urlAddress  
var pageName

function addToFavorites(urlAddress,pageName) { 
	if (window.external) { 
		window.external.AddFavorite(urlAddress,pageName) 
	} else { 
		alert("Sorry! Your browser doesn't support this function."); 
	}
} 

//Print THis page Funtions
var message = "Print this Page";
function printpage() {
	window.print();  
}

//Tell a friend function
function TellFriend(ref)
{ 
	var str="toolbar=no,status=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=320,width=500"
	tellaFriend = window.open(ref,"TellObj",str);
    tellaFriend.opener = top;
} 


//Open pop windows
function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
}


//Email Validate with form submit
function emailvalidation(field, alertbox) {
	var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
	apos=field.value.indexOf("@");
	dotpos=field.value.lastIndexOf(".");
	lastpos=field.value.length-1;
	var badEmail = (apos<1 || dotpos-apos<2 || lastpos-dotpos<2)
	
		if (goodEmail && !badEmail) {
			return true;
		}
		else {
			alert(alertbox);
			field.focus();
			field.select();
			return false;
		}
}

function emptyvalidation(entered, alertbox){
	with (entered)
	{
	if (value==null || value==""){
		if (alertbox!="") {
				alert(alertbox);
		} 
		return false;
	}else {
		return true;}
	}
}
function formvalidation(thisform){
	
	with (thisform){
		if (emptyvalidation(name,"Please enter your name")==false) {
				name.focus(); 
				return false;
		};
	
		if (emailvalidation(email,"Please enter your valid email address")==false) {
				email.focus(); return false;
		};
		
		estado = 0
		for (i = 0; i < document.subform.length; i++)
			if (document.subform.elements[i].name == "privacy") {
				if (document.subform.elements[i].checked == true) {
					estado = 1
				}
			}
			if (estado == 0) {
				alert("Please check privacy policy");
				return false;
			}		
		}

}

//Change Style Class - Function
function changeStyle(id,classpassed){
	document.getElementById(id).className=classpassed;
}

//Send form
function Search() {
	topic = document.elearning.topic.value
	searching = document.elearning.searching.value
	document.elearning.action = "search/" + topic + "/" + searching + ".html"
	document.elearning.submit()
}

function Enter(e) { 
	tecla = (document.all) ? event.keyCode : e.which; 
	if (tecla==13) {
		Search()
	};
}

function CreateBookmarkLink() {
	title = "Luckyou Music"; 
	// Blogger - Replace with <$BlogItemTitle$> 
	// MovableType - Replace with <$MTEntryTitle$>

	url = "http://www.luckyoumusic.com";
	// Blogger - Replace with <$BlogItemPermalinkURL$> 
	// MovableType - Replace with <$MTEntryPermalink$>
	// WordPress - <?php bloginfo('url'); ?>

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true;
	}
}

function setHomepage() {
	if (document.all) {
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://www.luckyoumusic.com');
	} else if (window.sidebar) {
		if(window.netscape) {
			try {
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
			} catch(e) {  
				alert("this action was aviod by your browser,if you want to enable,please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");  
			}
		} 
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage','http://www.luckyoumusic.com');
	 }
}
