var curElement = ''
var litElement = ''
var ns4 = (document.layers)? true:false;

function GetSenderFromEvent(e)
{
    if (isVarDefined(e.srcElement))
    {
        return (e.srcElement);
    }
    else
    {
        return (e.target);
    }
}

function isVarDefined(inVal)
{
    if (typeof inVal == 'undefined')
    {
        return 0;
    }
    else
    {
        return 1;   
    }
}

function lite(a){
	var aa
	if ((litElement != aa)&&(litElement != '')){
		if (litElement==curElement){litElement.style.color = 'rgb(255,255,255)'} else {litElement.style.color = 'rgb(245,228,114)'}
	}
	litElement = a
	litElement.style.color = 'rgb(153,255,204)'
}

function delite(){
//	if (litElement==curElement){litElement.className = 'hitem'} else {litElement.className = 'jitem'}
	if (litElement != ''){
		if (ns4){ litElement.color='rgb(245,228,114)' } else { litElement.style.color='rgb(245,228,114)' }
	}
	litElement = ''
}

function unlite(){
	if (curElement != ''){
		if (ns4){ curElement.color='rgb(245,228,114)' } else { curElement.style.color='rgb(245,228,114)' }
		if (litElement==curElement){
			if (ns4){ curElement.color='rgb(153,255,204)' } else { curElement.style.color='rgb(153,255,204)' }
		}
		curElement = ''
	}
}

function jItemOver(v){
	if (v != curElement){
		unlite()
		curElement = v
		if (ns4){ v.color='rgb(255,255,255)'; } else { v.style.color='rgb(255,255,255)'; }
	}
}

function jItemOut(){
	unlite()
}

function jItemClick(ev){
	var a
	var s = GetSenderFromEvent(ev)
	if (s != a){
		var n = s
		lite(n)
	}
}

function cItemOver(v,c){
	if (ns4){ v.color=c; } else { v.style.color=c; }
}

function cItemOut(v,c){
	if (ns4){ v.color=c } else { v.style.color=c }
}

function hlProduct(v){
//	fetchNCLBTCookie()
	document.location = "purc.asp?f=" + cookieF
}

function mmenu(){
//	fetchNCLBTCookie()
	if (cookieF==4){
		document.location = "sell6.asp?f=" + cookieF
	} else {
		document.location = "main.asp?f=" + cookieF
	}
}

function cmenu(t){
//	fetchNCLBTCookie()
	document.location = "slib2.asp?f=" + cookieF + "&pt=" + t
}

function taf(){ 
	var winwidth = 500; 
	var winheight = 320; 
	var winleft = (screen.width / 2) - (winwidth / 2); 
	var wintop = (screen.height / 2) - (winheight / 2); 
	var str="toolbar=no,status=no,menubar=no,location=no,scrollbars=no,resizable=no,height=320,width=500,top=" + wintop.toString() + ",left=" + winleft.toString()
	var w = window.open("./taf/taf.asp","TellObj",str);
} 

function pingTog(v){
	document.getElementById('IFrame1').src = 'purc/tog.asp?t=' + v.toString()
}

function pingRevisit(v){
	document.getElementById('IFrame1').src = 'purc/revisit.asp?t=' + v.toString()
}

function buyLL(){
	clearCheckedI()
	pushCheckedI(0,fetchSKU(0))
	buyme = true
	strobeCheckedI()
}


