﻿count=0;var picOff=new Array();var picOn=new Array();
function TurnOn1(num){eval("picV"+num+"=new Image()");eval("picV"+num+".src='"+picOn[num]+"'");eval("document.pic"+num+"a.src=picV"+num+".src");};
function TurnOff1(num1){eval("picZ"+num1+"=new Image()");eval("picZ"+num1+".src='"+picOff[num1]+"'");eval("document.pic"+num1+"a.src=picZ"+num1+".src");};
function rollover(picoff1,picon1,url,extra){picOff[count]=picoff1;picOn[count]=picon1;document.write("<a href='"+url+"' onmouseover='TurnOn1("+count+")' onmouseout='TurnOff1("+count+")' "+extra+"><img src='"+picoff1+"' border=0 name='pic"+count+"a'></a>");TurnOn1(count);TurnOff1(count);count++;};


context2 = {
    uid: 0,
    //dic: new fodDictionary(),
    
    createID: function(e)
    {
        this.uid++;
        //this.dic.add('uid_' + this.uid, e);
        mAdd('uid_' + id, e);
        return this.uid;
    },
    
    removeID: function(id)
    {
        //this.dic.remove('uid_' + id.toString());
        mDelete('uid_' + id.toString());
    },
    
    getElement: function(id)
    {
        //return this.dic.lookup('uid_' + id);
        return mLookup('uid_' + id);
    }
}
context = {
    uid: 0,
    dic: new fodDictionary(),
    
    createID: function(e)
    {
        this.uid++;
        this.dic.add('uid_' + this.uid, e);
         return this.uid;
    },
    
    removeID: function(id)
    {
        this.dic.remove('uid_' + id);
    },
    
    getElement: function(id)
    {
        return this.dic.lookup('uid_' + id);
    }
}



//fodDictionary//////////////////////////////////
function fodDictionary()
{
}
fodDictionary.prototype.lookup = function(key)
{
	return(this[key]);
	//return mLookup(key);
}
fodDictionary.prototype.add = function(key, item)
{
	this[key] = item;
	//mAdd(key,item);
}
fodDictionary.prototype.remove = function(key)
{
	this[key] = null;
	//mDelete(key);
}
fodDictionary.prototype.exists = function(key)
{
	return this[key] != null;
	//return mExists(key);
}
/////////////////////////////////////////////////



function mLookup(strKeyName) {
		return(this[strKeyName]);
}

// The meta Add method:
function mAdd() {
	for (c=0; c<mAdd.arguments.length; c+=2) {
		this[mAdd.arguments[c]] = mAdd.arguments[c+1];
	}
}

// The Delete method
function mDelete(strKeyName) {
	for (c=0; c<mDelete.arguments.length; c++) {
			this[mDelete.arguments[c]] = null;
	}
}

// The Exists method
function mExists(strKeyName) {
	for (c=0; c<mExists.arguments.length; c++) {
			return this[mExists.arguments[c]] != null;
	}
}


// A dictionary object of Cities and States/Countries:
function cRolly() {
	this.Add = mAdd;
	this.Lookup = mLookup;
	this.Delete = mDelete;
	this.Exists = mExists;
}

var o = new cRolly();

function rollon(elem, url)
{
	o.Add(elem, elem.src);
	elem.src = url;
}

function rolloff(elem)
{
	if(o.Exists(elem))
		elem.src = o.Lookup(elem);
}
