if (document.images) {

	menu_homeOn = new Image
	menu_homeOff = new Image
	menu_homeOn.src = '/x/skin1/EMGimg/menu/home_off.jpg'
	menu_homeOff.src = '/x/skin1/EMGimg/menu/home_on.jpg'

	menu_specialsOn = new Image
	menu_specialsOff = new Image
	menu_specialsOn.src = '/x/skin1/EMGimg/menu/specials_off.jpg'
	menu_specialsOff.src = '/x/skin1/EMGimg/menu/specials_on.jpg'

	menu_newusersOn = new Image
	menu_newusersOff = new Image
	menu_newusersOn.src = '/x/skin1/EMGimg/menu/newusers_off.jpg'
	menu_newusersOff.src = '/x/skin1/EMGimg/menu/newusers_on.jpg'

	menu_myaccountOn = new Image
	menu_myaccountOff = new Image
	menu_myaccountOn.src = '/x/skin1/EMGimg/menu/myaccount_off.jpg'
	menu_myaccountOff.src = '/x/skin1/EMGimg/menu/myaccount_on.jpg'

	menu_mywishlistOn = new Image
	menu_mywishlistOff = new Image
	menu_mywishlistOn.src = '/x/skin1/EMGimg/menu/mywishlist_off.jpg'
	menu_mywishlistOff.src = '/x/skin1/EMGimg/menu/mywishlist_on.jpg'

	menu_viewmycartOn = new Image
	menu_viewmycartOff = new Image
	menu_viewmycartOn.src = '/x/skin1/EMGimg/menu/viewmycart_off.jpg'
	menu_viewmycartOff.src = '/x/skin1/EMGimg/menu/viewmycart_on.jpg'

	menu_aboutavlOn = new Image
	menu_aboutavlOff = new Image
	menu_aboutavlOn.src = '/x/skin1/EMGimg/menu/aboutavl_off.jpg'
	menu_aboutavlOff.src = '/x/skin1/EMGimg/menu/aboutavl_on.jpg'

	menu_customerserviceOn = new Image
	menu_customerserviceOff = new Image
	menu_customerserviceOn.src = '/x/skin1/EMGimg/menu/customerservice_off.jpg'
	menu_customerserviceOff.src = '/x/skin1/EMGimg/menu/customerservice_on.jpg'

	menu_contactusOn = new Image
	menu_contactusOff = new Image
	menu_contactusOn.src = '/x/skin1/EMGimg/menu/contactus_off.jpg'
	menu_contactusOff.src = '/x/skin1/EMGimg/menu/contactus_on.jpg'

	menu_helpOn = new Image
	menu_helpOff = new Image
	menu_helpOn.src = '/x/skin1/EMGimg/menu/help_off.jpg'
	menu_helpOff.src = '/x/skin1/EMGimg/menu/help_on.jpg'

	menu_faqOn = new Image
	menu_faqOff = new Image
	menu_faqOn.src = '/x/skin1/EMGimg/menu/faq_off.jpg'
	menu_faqOff.src = '/x/skin1/EMGimg/menu/faq_on.jpg'

	menu_webmastersOn = new Image
	menu_webmastersOff = new Image
	menu_webmastersOn.src = '/x/skin1/EMGimg/menu/webmasters_off.jpg'
	menu_webmastersOff.src = '/x/skin1/EMGimg/menu/webmasters_on.jpg'

	menu_contentownersOn = new Image
	menu_contentownersOff = new Image
	menu_contentownersOn.src = '/x/skin1/EMGimg/menu/contentowners_off.jpg'
	menu_contentownersOff.src = '/x/skin1/EMGimg/menu/contentowners_on.jpg'

                land_enterOn = new Image
	land_enterOff = new Image
	land_enterOn.src = '/x/skin1/EMGimg/landing/enter1.jpg'
	land_enterOff.src = '/x/skin1/EMGimg/landing/enter2.jpg'

	}

else

	{

	menu_homeOn = ""
	menu_homeOff = ""
                land_enterOn = ""
	land_enterOff = ""
	menu_specialsOn = ""
	menu_specialsOff = ""
	menu_newusersOn = ""
	menu_newusersOff = ""
	menu_myaccountOn = ""
	menu_myaccountOff = ""
	menu_mywishlistOn = ""
	menu_mywishlistOff = ""
	menu_viewmycartOn = ""
	menu_viewmycartOff = ""
	menu_aboutavlOn = ""
	menu_aboutavlOff = ""
	menu_customerserviceOn = ""
	menu_customerserviceOff = ""
	menu_contactusOn = ""
	menu_contactusOff = ""
	menu_helpOn = ""
	menu_helpOff = ""
	menu_faqOn = ""
	menu_faqOff = ""
	menu_webmastersOn = ""
	menu_webmastersOff = ""
	menu_contentownersOn = ""
	menu_contentownersOff = ""

}


function popSmallWindow(URL, x, y)	{
	local_link('POP',URL);
  	newWindow = window.open(URL,"popSmall","width="+x+",height="+y+"");
	}
	
function popSLWindow(URL, x, y)	{
	local_link('SL',URL);
  	newWindow = window.open(URL,"sl_player","width="+x+",height="+y+"");
	}	

function openHelpWindow(path)
{
	hw=window.open(path,"helpwin","height=565,width=525,scrollbars=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,titlebar=no");
if((navigator.userAgent.toLowerCase().indexOf("msie")==-1)||(parseInt(navigator.appVersion)>=5))
	hw.focus();
}

function checkIfSpecialCharacter(event) {


   if (event.keyCode){
      key = event.keyCode
}
   else if (event.which){
      key = event.which;
}
   if ((key> 31 && key< 45) || (key > 45 && key< 48)|| (key > 57 && key < 65) || (key > 90 && key < 95) || (key > 95 && key < 97) ||  (key > 122)) {  
    alert("Illegal character: " + String.fromCharCode(key)  + "\n\nOnly Numbers, Letters, _ (underscore) and - (dash) are allowed!");
    event.returnValue = false;
    return false;
  }
}

function addBookmark(title,url) {
if (window.sidebar) { 
window.sidebar.addPanel(title, url,""); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}

function setCookie(cookieName,cookieValue,nDays,path,domain) 
{
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString()
		 + ";path="+path
		 + ";domain="+domain;
}

    
/** 
 * Sets a Cookie with the given name and value.
 *  
 * name       Name of the cookie
 * value      Value of the cookie
 * [expires]  Expiration date of the cookie (default: end of current session)
 * [path]     Path where the cookie is valid (default: path of calling document)
 * [domain]   Domain where the cookie is valid
 *              (default: domain of calling document)
 * [secure]   Boolean value indicating if the cookie transmission requires a
 *              secure transmission
function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}       
 */
            
/**         
 * Gets the value of the specified cookie.
 *  
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

/**
 * Deletes the specified cookie.
 *
 * name      name of the cookie
 * [path]    path of the cookie (must be same as path used to create cookie)
 * [domain]  domain of the cookie (must be same as domain used to create cookie)
 */
function deleteCookie(name, path, domain)
{
    if (getCookie(name))
    {
        document.cookie = name + "=" +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}


function popPlayerWindow(uri)
{
        //var uri = "player.emgp?sid=" + sid + "type=" + type;

        popWin = window.open(uri,"sl_player","height=700,width=774,scrollbars=no,resizable=no,status=no,toolbar=no,menubar=no,location=no,titlebar=no");
	//hw=window.open(path,"helpwin","height=565,width=525,scrollbars=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,titlebar=no");
	return (popWin);
}

function local_link(that, url)
{

	if (that == 'F' || that == 'SL' || that == 'POP')
	{
		//alert(url);
		return url;
		//return true;
	}
	else
	{
		url = that.href;
	}
	//alert(url);
	return true;
}

function checkEmail(email)
{

var goodEmail = email.value.search(/^[^\.][A-Za-z0-9_\-\.]*[^\.]\@[^\.][A-Za-z0-9_\-\.]+((\.com)|(\.net)|(\.edu)|(\.se)|(\.fi)|(\.cc)|(\.tv)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.biz)|(\.us)|(\.bizz)|(\.coop)|(\..{2,2}))[ ]*$/gi);

if (goodEmail == -1)
{
         alert("E-mail address is invalid! Please correct");
         email.focus();
         email.select();
    return false;
}
}
