/* ------------------------------------------------------------
Common.js file
Clubed the following JS files into 1 for performance issue of F.F
	-	util.js
	-	Language_milonic_src.js
	-	Langauge_mmenudom.js
	-	eluminate.js
	-	cmdatatagutils.js
	-	jsIclive.js
	-	CheckAvailability.js
	-	DropdownCalendar.js
	-	BrowserDetection.js
	-	FlashPlayerDetection.js
	-	AC_RunActiveContent.js
	
---------------------------------------------------------------*/
/* ------------------------------------------------------------
util .js
---------------------------------------------------------------*/
Date.prototype.currentCulture = "en-CA";
Date.prototype.setCurrentCulture = function( culture ){ this.currentCultureIndex = -1; this.currentCulture = culture; };
Date.prototype.cultures = [ "en-CA", "fr-CA" ];

Date.prototype.monthNames = new Array(2);
Date.prototype.monthNames[ 0 ] = ["January","February","March","April","May","June","July","August","September","October","November","December"];
Date.prototype.monthNames[ 1 ] = ["Janvier","F?vrier","Mars","Avril","Mai","Juin","Juillet","Ao?t","Septembre","Octobre","Novembre","D?cembre"];

Date.prototype.dayNames = new Array(2);
Date.prototype.dayNames[ 0 ] = ["S","M","T","W","T","F","S"];
Date.prototype.dayNames[ 1 ] = ["S","M","T","W","T","F","S"];

Date.prototype.monthYearFormat = new Array(2);
Date.prototype.monthYearFormat[ 0 ] = ['M Y'];
Date.prototype.monthYearFormat[ 1 ] = ['Y M'];

Date.getFormatCode = function(character) { switch (character) { case "d": return "String.leftPad(this.getDate(), 2, '0') "; case "D": return "Date.dayNames[this.getDay()].substring(0, 3) "; case "j": return "this.getDate() "; case "l": return "Date.dayNames[this.getDay()] ";case "S": return "this.getSuffix() "; case "w": return "this.getDay() "; case "z": return "this.getDayOfYear() "; case "W": return "this.getWeekOfYear() "; case "F": return "Date.monthNames[this.getMonth()] "; case "m": return "String.leftPad(this.getMonth() + 1, 2, '0') "; case "M": return "this.getCurrentMonthName(  ) "; case "n": return "(this.getMonth() + 1) "; case "t":  return "this.getDaysInMonth() ";  case "L": return "(this.isLeapYear() ? 1 : 0) "; case "Y": return "this.getFullYear() "; case "y": return "('' + this.getFullYear()).substring(2, 4) "; case "a": return "(this.getHours() < 12 ? 'am' : 'pm') "; case "A": return "(this.getHours() < 12 ? 'AM' : 'PM') "; case "g": return "((this.getHours() %12) ? this.getHours() % 12 : 12) "; case "G": return "this.getHours() "; case "h": return "String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') "; case "H": return "String.leftPad(this.getHours(), 2, '0') "; case "i": return "String.leftPad(this.getMinutes(), 2, '0') "; case "s": return "String.leftPad(this.getSeconds(), 2, '0') "; case "O": return "this.getGMTOffset() "; case "T": return "this.getTimezone() "; case "Z": return "(this.getTimezoneOffset() * -60) "; default: return "'" + String.escape(character) + "' "; } }

Date.prototype.getFormatedDate = function ( format ) { var code = ''; var formatLength = format.toString().length; for( var i = 0; i < formatLength; i++ ) { code += eval(Date.getFormatCode(format.toString().substr(i, 1)) ); } return code; }
Date.prototype.getCurrentFormatedDate = function ( ){ return this.getFormatedDate( this.monthYearFormat[ this.getCurrentCultureIndex() ] ); }

Date.prototype.currentCultureIndex = -1;
Date.prototype.getCurrentCultureIndex = function (){ if ( this.currentCultureIndex < 0 ) { for( var i = 0; i < this.cultures.length; i++ ) { if ( this.cultures[ i ] == this.currentCulture ) this.currentCultureIndex = i; } } return this.currentCultureIndex;};
Date.prototype.getCurrentMonthName = function ( ) { return this.monthNames[ this.getCurrentCultureIndex() ][ this.getMonth() ]; }
Date.prototype.getMonthName = function ( month ) { return this.monthNames[ this.getCurrentCultureIndex() ][ month ]; }

Date.prototype.getCurrentDayName = function ( ) { return this.dayNames[ this.getCurrentCultureIndex() ][ this.getDay() ]; }
Date.prototype.getDayName = function ( day ) { return this.dayNames[ this.getCurrentCultureIndex() ][ day ]; }

Date.prototype.getMonthYear = function ( ) { return this.dayNames[ this.getCurrentCultureIndex() ][ day ]; }
        
String.escape = function(string) { return string.replace(/('|\\)/g, "\\$1"); }

String.leftPad = function (val, size, ch) { var result = new String(val); if (ch == null) { ch = " "; } while (result.length < size) { result = ch + result; } return result; }


function popUpEmailOffers(baseUrl, cultureName)
{                     
	window.location.href = baseUrl + 'aspx/EmailOffers.aspx?put=eo&lang='+ cultureName;
	//window.open(baseUrl + 'aspx/EmailOffers.aspx?put=eo&lang='+ cultureName,'Emailoffers','menubar=0,resizable=0,scrollbars=1,width=640,height=830');	
}
function popUpFPCGuestServicesTeam(baseUrl)
{                     
//	window.open(baseUrl + 'aspx/FPCGuestServiceTeam.aspx?put=fpcst' ,'InYourOpinion','menubar=0,resizable=1,scrollbars=1,width=640,height=830');
    openPopUp(baseUrl + 'aspx/FPCGuestServiceTeam.aspx?put=fpcst' ,'InYourOpinion',0,1,1,700,830);
}

function popUpYourOpinion(baseUrl, hotelCode)
{                    
     //aspx/YourOpinion.aspx
     if(hotelCode == undefined)
        hotelCode = "";
	//window.open(baseUrl + '&hc=' + hotelCode ,'InYourOpinion','menubar=0,resizable=1,scrollbars=1,width=640,height=830');
	openPopUp(baseUrl + '&hc=' + hotelCode ,'InYourOpinion',0,1,1,700,830);
}

function popUpFeedback(baseUrl)
{                     
//	window.open(baseUrl + 'aspx/Feedback.aspx' ,'Feedback','menubar=0,resizable=1,scrollbars=1,width=640,height=830');
    openPopUp(baseUrl + 'aspx/Feedback.aspx' ,'Feedback',0,1,1,700,830);
}
function popUpContactUs(baseUrl)
{                     
//	window.open(baseUrl + 'aspx/ContactUs.aspx' ,'ContactUs','menubar=0,resizable=1,scrollbars=1,width=640,height=830');
    openPopUp(baseUrl + 'aspx/ContactUs.aspx' ,'ContactUs',0,1,1,700,830);
}

function popUpRoomrate(pageUrl )
{
    openPopUp( pageUrl,'RoomRate', 0, 1, 1, 675, 850 );  
}

function popUpRoomview(pageUrl)
{
    openPopUp( pageUrl,'RoomView', 0, 1, 1, 700, 850);    
}

function popUpMoreInfo(pageUrl)
{                     
	openPopUp(pageUrl,'MoreInfo', 0, 1, 1, 700, 850);
}

function popUpTravelTool(pageUrl, title)
{                     
    openPopUp(pageUrl,'TravelTools', 0, 1, 0, 700, 520);
}

function popUpSendEPostCard(url)
{                    
    //Changed:
    //Author: Rahul Sharma
    //Date: 26 June, 2008
    //Reason: Changed width of the pop up window to show whole content,
    //and show the scroll bars 
	openPopUp( url, 'SendEPostCard', 0, 0, 0, 700, 600);
}


function popUpPropertyPhoto(pageUrl)
{                     
    openPopUp(pageUrl,'PropertyPhoto', 0, 1, 0, 960, 600);
}

function openPopUp(pageUrl, title, menubar, resizable, scrollbars, width, height)
{
    if ( pageUrl.indexOf( "?" ) < 0 )
        pageUrl += "?";
    else
        pageUrl += "&";
         
     //menubar = 0;
     //resizable = 0;
     scrollbars = 1;
     //width = 700;
     height = 600;
     
   var leftVal = (screen.width - width) / 2;
   var topVal = (screen.height - height) / 2;
       
  window.open(pageUrl + 'DisplayType=popup',title,'menubar=' + menubar + ',resizable=' + resizable + ',scrollbars=' + scrollbars + ',width=' + width + ' ,height=' + height + ',Left=30,Top=90');
}


 
function OpenWindow(address, heigth, width, title)   
{   
 var winl = (screen.width-width)/2;   
 var wint = (screen.height-heigth)/2;   
 var options = "width=" + width;   
 options += ",height=" + heigth;   
 options += ",top=" + wint;   
 options += ",left=" + winl;   
 options += ",location=yes,toolbar=yes, menubar=yes, scrollbars=1, resizable";   
  
 window.open(address, title, options);   
}

function openPopUpMore(pageUrl, title, menubar, resizable, scrollbars, width, height)
{
   var leftVal = (screen.width - width) / 2;
   var topVal = (screen.height - height) / 2;
       
  window.open(pageUrl,title,'menubar=' + menubar + ',resizable=' + resizable + ',scrollbars=' + scrollbars + ',width=' + width + ' ,height=' + height + ' ,left='+ leftVal +' ,top=' + topVal);
  return false;
}

function popupNeedhelp(url)
{
 openPopUp(url, 'Help', 0, 0, 0, 700, 600 );
}

function findPositionX(obj)
{
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
}

function findPositionY(obj)
{
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
}

function popUpResvWait(obj1, top, left)
{
    if ( obj1 == "" )
        return;
        
    var popup = document.getElementById(obj1);
    if ( !popup )
        return;
    
	if (top && left) {
	    popup.style.top = top;
	    popup.style.left = left;
	    popup.style.display = "block";
	} else {
	  	var popupX = popupY = 0;
	    var targetX = targetY = 0;
	    var moveToX = moveToY = 0;
	    var offsetLeft = offsetTop = 0;  
	    var myWidth = myHeight = 0;
        if( typeof( window.innerWidth ) == 'number' ) {
            //Non-IE
            myWidth = window.innerWidth;
            myHeight = window.innerHeight;
        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
            //IE 6+ in 'standards compliant mode'
            myWidth = document.documentElement.clientWidth;
            myHeight = document.documentElement.clientHeight;
        } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
            //IE 4 compatible
            myWidth = document.body.clientWidth;
            myHeight = document.body.clientHeight;
        } else {
            //Error
            return;
        }
        
        popup.style.display = "block";
        
        popupX = findPositionX(popup);
        popupY = findPositionY(popup);
        
        targetX = ((myWidth / 2) - (popup.offsetWidth / 2));
        targetY = ((myHeight / 2) - (popup.offsetHeight / 2));
        
        moveX = ( targetX - popupX );
        moveY = ( targetY - popupY );
       
        popup.style.left = moveX + 'px';
        popup.style.top = moveY + 'px';
	}
	
    showHideDropdowns("hidden");
}

function popUpResvProcess(obj1, top, left)
{
    if ( obj1 == "" )
        return;
   
    var popup = document.getElementById(obj1);
    if ( !popup )
        return;
    
	if (top && left) {
	    popup.style.top = top;
	    popup.style.left = left;
	    popup.style.display = "block";
	} else {
	  	var popupX = popupY = 0;
	    var targetX = targetY = 0;
	    var moveToX = moveToY = 0;
	    var offsetLeft = offsetTop = 0;  
	    var myWidth = myHeight = 0;
        if( typeof( window.innerWidth ) == 'number' ) {
            //Non-IE
            myWidth = window.innerWidth;
            myHeight = window.innerHeight;
        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
            //IE 6+ in 'standards compliant mode'
            myWidth = document.documentElement.clientWidth;
            myHeight = document.documentElement.clientHeight;
        } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
            //IE 4 compatible
            myWidth = document.body.clientWidth;
            myHeight = document.body.clientHeight;
        } else {
            //Error
            return;
        }
        
        popup.style.display = "block";
        
        popupX = findPositionX(popup);
        popupY = findPositionY(popup);
        
        targetX = ((myWidth / 2) - (popup.offsetWidth / 2));
        targetY = ((myHeight / 2) - (popup.offsetHeight / 2));
        
        moveX = ( targetX - popupX );
        moveY = ( targetY - popupY );
       
        popup.style.left = targetX + 'px';
        popup.style.top = targetY + 'px';
	}
	
    showHideDropdowns("hidden");
}

function encodeHtml(value) {
     encodedHtml = escape(value);
     encodedHtml = encodedHtml.replace(/\//g,"%2F");
     encodedHtml = encodedHtml.replace(/\?/g,"%3F");
     encodedHtml = encodedHtml.replace(/=/g,"%3D");
     encodedHtml = encodedHtml.replace(/&/g,"%26");
     encodedHtml = encodedHtml.replace(/@/g,"%40");
     return encodedHtml;
   } 

function CloseWindow()
{
    var windowObject = window.self; 
    windowObject.opener = window.self; 
    windowObject.close();
}
function hideMenu(obj, img1)
{
    if ( obj != "" )
    {
	    var el = document.getElementById(obj);
	    if ( el ) { el.style.display = "none"; }
	}
	
	if (img1 != "")
	{
	    var im1 = document.getElementById(img1);
    	if (im1) im1.style.display = "none";
    }
}

function switchMenu(obj, img1, img2)
{
	var el = document.getElementById(obj);
	var im1 = document.getElementById(img1);
	var im2 = document.getElementById(img2);
	
	if (el.style.display != "none")
	{
		el.style.display = "none";
	}
	else
	{
		el.style.display = "inline";
	}
	
	if (im1.style.display != "none")
	{
		im1.style.display = "none";
		im2.style.display = "inline";
	}
	else
	{
		im2.style.display = "none";
		im1.style.display = "inline";
	}
}

function switchTabs(obj1, obj2)
{
    var tab1 = document.getElementById(obj1);
    if ( tab1 != null && typeof( tab1 ) != 'undefined' )
        tab1.style.display = "inline";
        
     var elTravel = document.getElementById('TravelTools');
     var tab2 = document.getElementById(obj2);
     
    if ( tab2 != null && typeof( tab2 ) != 'undefined' )
    {
        tab2.style.display = "none";
        if(elTravel!=undefined)
        elTravel.style.display="inline";
    }
}

function CallReservation(obj1, obj2)
{
    if ( typeof( document.getElementById(obj1) ) != 'undefined' )
        document.getElementById(obj1).style.display = "none";
    if ( typeof( document.getElementById(obj2) ) != 'undefined' )
        document.getElementById(obj2).style.display = "block";
}

function toggleDropdown(propertyDropdown)
{        
    var tempDropdown = document.getElementById(propertyDropdown);
    
    if (tempDropdown.style.display == "inline")
    {
        showHideDropdowns("visible");
        tempDropdown.style.display = "none";
        document.onclick = null;
    }
    else
    {
        if (cal) document.getElementById(cal.id + "Container").style.display = "none";
        showHideDropdowns("hidden");
        tempDropdown.style.display = "inline";
    }
}

function showHideDropdowns(status)
{

    if (document.getElementById && document.createTextNode)
	{
	    var elIdArray = new Array();
	    var elNum = 0;
	    
	    if(document.getElementById("checkAvailability"))
	    {
	        elIdArray[elNum] = "checkAvailability";
	        elNum++;
	    } 
	    else if(document.getElementById("arrivalDate"))
	    {
	        elIdArray[elNum] = "arrivalDate";
	        elNum++;
	    } 
	    else if(document.getElementById("wizard"))
	    {
	        elIdArray[elNum] = "wizard";
	        elNum++;
	    }
	    if(document.getElementById("packageFinder"))
	    {
	        elIdArray[elNum] = "packageFinder";
	        elNum++;
	    }
	   
	    for (elID=0; elID < elIdArray.length; elID++) {
	        var selects = document.getElementById(elIdArray[elID]).getElementsByTagName("select");
	        for (var i = 0; i < selects.length; i++)
	        {
		        selects[i].style.visibility = status;
	        }
	        var spans = document.getElementById(elIdArray[elID]).getElementsByTagName("span");
	        for (var i = 0; i < spans.length; i++)
	        {
	            if (spans[i].id.indexOf("_txtDayOfWeek") > -1)
		            spans[i].style.visibility = status;
	        }
	      
	        
        }
	}
}

function selectHotel(id, hotel, propertyDropdown, propertyBox, propertyText)
{        
    document.getElementById(propertyBox).value = id;
    document.getElementById(propertyText).value = " " + hotel;
    toggleDropdown(propertyDropdown);
    if(enabledhotelautopostback)
    {
        __doPostBack(hoteleventtarget, id);
    }
}

function createTableRolls()
{
	if (document.getElementById && document.createTextNode)
	{
		var tables = document.getElementsByTagName("table");
		for (var i = 0; i < tables.length; i++)
		{
			if(tables[i].className == "ruler")
			{
				var trs = tables[i].getElementsByTagName("tr");
				for(var j = 0; j < trs.length; j++)
				{
					if(trs[j].parentNode.nodeName == "TBODY" && trs[j].className != "region")
					{
						trs[j].onmouseover = function(){this.className = "roll"; return false}
						trs[j].onmouseout = function(){this.className = ""; return false}
					}
				}
			}
		}
	}
}

function toggleCalendar(type)
{
    if ( cal )
    {
        var calContainer = document.getElementById(cal.id + "Container");
        if ( calContainer == null || typeof( calContainer ) == 'undefined' )
            return;
            
        if (calContainer.style.display == "inline" && cal.targetType == type)
        {
            calContainer.style.display = "none";
        }
        else
        {
	       	if (cal.id == "calendar")
            {
                    calContainer.style.width = "160px";
                    calContainer.style.marginLeft = "55px";
	        }                                    
            calContainer.style.display = "none";
            calContainer.className = "calendarContainer" + type;
            calContainer.style.display = "inline";
            calContainer.targetType = type;
            
            targetDate = new Date(cal[type + "Month"].value + "/" + cal[type + "Day"].value + "/" + cal[type + "Year"].value);
            targetDate = '<%=%>';
            setCalendar();
        }
    }
}

function generateArray(start, end)
{
    var tempArr = new Array();
    
    if (start > end) return false;
    
    for (var i = start; i <= end; i++)
    {
        tempArr.push(i);
    }
    
    return tempArr;
}

function populateDropdown(obj, opts, sel)
{
    if (typeof obj == "string") obj = document.getElementById(obj);
    
    if (obj!=null){
        for (var q = obj.options.length; q >= 0; q--)
        {
            obj.options[q] = null;
        }
        
        var s = 0;
        
        for (var item in opts)
        {
            var tempOpt = document.createElement("option");
            var tempTxt = document.createTextNode(opts[item]);
            
            tempOpt.value = (typeof opts[item] == "string") ? getMonthNumber(opts[item]) : opts[item];
            tempOpt.appendChild(tempTxt);
            
            obj.appendChild(tempOpt);
            
            if (opts[item] == sel) obj.selectedIndex = s;
            
            s++;
        }
    }
}

function selectDropdown(obj, sel)
{
    if (typeof obj == "string") obj = document.getElementById(obj);
    
    for (var s = obj.options.length - 1; s >= 0; s--)
    {
        if (obj.options[s] && obj.options[s].value == sel)
        {
            obj.selectedIndex = s;
            break;
        }
    }
}

// CALENDAR
// Default target date to today
var targetDate = new Date();

// This function updates the calendar display to reflect the current target date

function setCalendar()
{
    var el, tableEl, rowEl, cellEl, linkEl;
    var tmpDate, tmpDate2;
    var i, j;

    if (cal != null)
    {

        // Update month name
        el = document.getElementById(cal.id + "Header").firstChild;
        el.nodeValue = targetDate.getCurrentMonthName() + "\u00a0" + targetDate.getFullYear();
        
        var prevLink = document.getElementById(cal.id + "PrevLink");
        var currentDate = new Date();
        if ( prevLink )
        {
            if ((targetDate.getMonth() - 1) < currentDate.getMonth() && targetDate.getFullYear() == currentDate.getFullYear()) 
                prevLink.firstChild.firstChild.nodeValue = "";
            else 
                prevLink.firstChild.firstChild.nodeValue = "<<";
        }
	if(isNaN(targetDate))
		targetDate = new Date();

        // Start with the first day of the month and go back if necessary to
        // the previous Sunday
        tmpDate = new Date(Date.parse(targetDate));
        tmpDate.setDate(1);
        while (tmpDate.getDay() != 0)
        {
            tmpDate.addDays(-1);
        }

        tableEl = cal;
        
        if (!tableEl.targetType) tableEl.targetType = "Arrival";

        // Go through each calendar day cell in the table and update it
        for (i = 2; i <= 7; i++)
        {
            rowEl = tableEl.rows[i];

            // Hide row if it contains no dates in the current month
            tmpDate2 = new Date(Date.parse(tmpDate));
            tmpDate2.addDays(6);
            
            if (tmpDate.getMonth()  != targetDate.getMonth() && tmpDate2.getMonth() != targetDate.getMonth()) rowEl.className = "empty";
            else rowEl.className = "";
            
            // Loop through a week
            for (j = 0; j < rowEl.cells.length; j++)
            {
                cellEl = rowEl.cells[j];
                linkEl = cellEl.firstChild;

                if (tmpDate.getMonth() == targetDate.getMonth())
                {
                    linkEl.date = new Date(Date.parse(tmpDate));
                    s = tmpDate.toString().split(" ");
                    linkEl.title = s[0] + " " + s[1] + " " + s[2] + ", " + s[s.length - 1];
                    linkEl.firstChild.nodeValue = tmpDate.getDate();
                    linkEl.style.visibility = "";
                    linkEl.onclick = function ()
                    {
                        targetDate = new Date(Date.parse(this.date));
                        setCalendar();
                        displayDate();
                        return false;
                    }
                }
                else
                {
                    linkEl.style.display = "none";
                    linkEl.firstChild.nodeValue = "";
                }
                
                // Highlight the current date
                if (cellEl.oldClass == null) cellEl.oldClass = cellEl.className;
                var now = new Date();
                if ((now.getFullYear() == tmpDate.getFullYear()) &&
                    (now.getDate() == tmpDate.getDate()) &&
                    (now.getMonth() == tmpDate.getMonth()))
                {
                    cellEl.className = cellEl.oldClass + " target";
                }
                else cellEl.className = cellEl.oldClass;

                // Go to the next day
                tmpDate.addDays(1);
            }
        }

    }
}

// Event handlers for the calendar elements

function addMonths(n)
{
    // Advance the calendar month and update the display
    targetDate.addMonths(n);
    setCalendar();
}

function addYears(n)
{
    // Advance the calendar year and update the display
    targetDate.addYears(n);
    setCalendar();
}

function displayDate()
{
    // Display the current target date as a formatted string
    updateDateFields(targetDate, cal.targetType);
    validateDates(cal.targetType);
    toggleCalendar(cal.targetType);
}

function updateDateFields(date, type)
{
    if(cal[type + "Month"] == undefined || cal[type + "Day"] == undefined || cal[type + "Year"] == undefined)
	return;
    var tempMonth = date.getMonth() + 1;
    if (tempMonth < 10) tempMonth = "0" + tempMonth;
    selectDropdown(cal[type + "Day"], date.getDate());
    selectDropdown(cal[type + "Month"], tempMonth);
    selectDropdown(cal[type + "Year"], date.getFullYear());
    updateDayName(type);
}

function updateNumberOfNights()
{
    if (cal["NumberOfNights"] != undefined && cal["NumberOfNights"] != null)
    {
        var arrivalDate = new Date(cal.ArrivalMonth.value + "/" + cal.ArrivalDay.value + "/" + cal.ArrivalYear.value);
        var departureDate = new Date(cal.DepartureMonth.value + "/" + cal.DepartureDay.value + "/" + cal.DepartureYear.value);
        var numberOfNights = Math.ceil((departureDate.getTime() - arrivalDate.getTime()) / (1000 * 60 * 60 * 24));
        
        if (numberOfNights > 10) numberOfNights = 11;
        selectDropdown(cal.NumberOfNights, numberOfNights);
    }
}

function updateDayName(type)
{
    if (cal[type + "DayName"] != undefined && cal[type + "DayName"] != null)
    {
        var date = new Date(cal[type + "Month"].value + "/" + cal[type + "Day"].value + "/" + cal[type + "Year"].value);
        cal[type + "DayName"].value = daysArray[date.getDay()];
    }
}

function getMonthNumber(month)
{
    for (var i in monthsArray)
    {
        if (monthsArray[i] == month)
        {
            i++;
            if (i < 10) i = "0" + i;
            return i;
        }
    }
}

function validateDates(type)
{
    if(cal.DepartureMonth == undefined)
	return;
    var arrivalDate = new Date(cal.ArrivalMonth.value + "/" + cal.ArrivalDay.value + "/" + cal.ArrivalYear.value);
    var departureDate = new Date(cal.DepartureMonth.value + "/" + cal.DepartureDay.value + "/" + cal.DepartureYear.value);
    var currentDate = new Date();
    
    arrivalDate = YearChange(arrivalDate);
    
    updateDateFields(arrivalDate, "Arrival");
    updateDateFields(departureDate, "Departure");
    
    if (type == "NumberOfNights")
    {
        arrivalDate.setDate(arrivalDate.getDate() + Number(cal.NumberOfNights.value));
        updateDateFields(arrivalDate, "Departure");
    }
    else
    {      
        if (type == "Arrival")
        {        
            if ((departureDate <= arrivalDate))
            {            
                departureDate = arrivalDate;
                if (cal.NumberOfNights)
                {
                    departureDate.setDate(departureDate.getDate() + Number(cal.NumberOfNights.value));                
                }
                else
                {
                    departureDate.setDate(departureDate.getDate() + 1);
                }
                updateDateFields(departureDate, "Departure");
            }
        }
        else if (type == "Departure")
        {
            if ((arrivalDate >= departureDate))
            {
                arrivalDate = departureDate;

               if (cal.NumberOfNights)
                {
                    arrivalDate.setDate(arrivalDate.getDate() - Number(cal.NumberOfNights.value));
                }
                else
                {
                    arrivalDate.setDate(arrivalDate.getDate() - 1);
                }
                updateDateFields(arrivalDate, "Arrival");
            }
        }
        
        updateNumberOfNights();
        updateDayName(type);
    }
}

//Check if month is past, date show next year.
function YearChange(dateCheck)
{   
   	var now = new Date();
	var dayNow = now.getDate();
	var monthNow = now.getMonth();
	var yearNow = now.getFullYear();

	var dayCheck =  dateCheck.getDate();
	var monthCheck = dateCheck.getMonth();
	var yearCheck  = dateCheck.getFullYear();
	var dateReturn; 
    var dayDiff;
	var Minute = 60*1000;
	var Hour = Minute * 60;
	var Day = Hour * 24;

	dayDiff = (dateCheck - now)/Day

	if ((yearNow == yearCheck) && (monthNow != monthCheck) && (monthNow > monthCheck) && (dayDiff < 1))
	{
       yearCheck = parseInt(yearCheck) + 1;
	}
	
	var  d = new Date(yearCheck, monthCheck, dayCheck);
	
	return d;
}

// Add new properties and methods to the Date object

Date.prototype.addDays      = dateAddDays;
Date.prototype.addMonths    = dateAddMonths;
Date.prototype.addYears     = dateAddYears;

// getMonthName(): Returns the name of the date's month

function dateGetMonthName()
{
    return this.monthNames[this.getMonth()];
}

// getDays(): Returns the number of days in the date's month

function dateGetDays()
{
    var tmpDate, d, m;

    tmpDate = new Date(Date.parse(this));
    m = tmpDate.getMonth();
    d = 28;
    do
    {
        d++;
        tmpDate.setDate(d);
    } while (tmpDate.getMonth() == m);

    return d - 1;
}

// addDays(n): Adds the specified number of days to the date

function dateAddDays(n)
{
    // Add the specified number of days
    this.setDate(this.getDate() + n);

    // Reset the new day of month.
    this.savedDate = this.getDate();
}

// addMonths(n): Adds the specified number of months to the date, adjusting
// the day of the month if necessary

function dateAddMonths(n)
{
    // Save the day of month if not already set
    if (this.savedDate == null)
    this.savedDate = this.getDate();

    // Set the day of month to the first to avoid rolling
    this.setDate(1);

    // Add the specified number of months
    this.setMonth(this.getMonth() + n);

    // Restore the saved day of month, if possible
    this.setDate(Math.min(this.savedDate, this.getDays()));
}

// addYears(n): Adds the specified number of years to the date, adjusting the
// day of the month for leap years

function dateAddYears(n)
{
    // Save the day of month if not already set
    if (this.savedDate == null)
    this.savedDate = this.getDate();

    // Set the day of month to the first to avoid rolling
    this.setDate(1);

    // Add the specified number of years
    this.setFullYear(this.getFullYear() + n);

    // Restore the saved day of month, if possible
    this.setDate(Math.min(this.savedDate, this.getDays()));
}

//Show/ Hide link associated script for <div> tags
function toggleLayer(whichLayer)
{
     if (document.getElementById)
     {
          // this is the way the standards work
          var style2 = document.getElementById(whichLayer).style;
          style2.display = style2.display? "":"block";
     }
     else if (document.all)
     {
          // this is the way old msie versions work
          var style2 = document.all[whichLayer].style;
          style2.display = style2.display? "":"block";
     }
     else if (document.layers)
     {
          // this is the way nn4 works
          var style2 = document.layers[whichLayer].style;
          style2.display = style2.display? "":"block";
     }
}

//To get control list by passing the controlID prefix
 function getElementsById(sId)
 {
    var outArray = new Array();	
	if(typeof(sId)!='string' || !sId)
	{
		return outArray;
	};
	
	if(document.evaluate)
	{
		var xpathString = "//*[@id='" + sId.toString() + "']"
		var xpathResult = document.evaluate(xpathString, document, null, 0, null);
		while ((outArray[outArray.length] = xpathResult.iterateNext())) { }
		outArray.pop();
	}
	else if(document.all)
	{
		
		for(var i=0,j=document.all[sId].length;i<j;i+=1){
		outArray[i] =  document.all[sId][i];}
		
	}else if(document.getElementsByTagName)
	{
		var aEl = document.getElementsByTagName( '*' );	
		for(var i=0,j=aEl.length;i<j;i+=1){
		
			if(aEl[i].id == sId )
			{
				outArray.push(aEl[i]);
			};
		};	
		
	};
	
	return outArray;
 }
 
 function getQueryValue(url, queuryStringKey)
 {
  var keyStartPos = url.indexOf("?" + queryStringKey + "=");
  if (keyStartPos < 0)
    keyStartPos = url.indexOf("&" + queryStringKey + "=");


  var stringEndPos = url.indexOf("&" + keyStartPos + "=");
  if (stringEndPos < 0)
    stringEndPos = url.length;

  return url.substr(keyStartPos + 5, stringEndPos  - (keyStartPos + 5));
 }

//IE button hover
sfHover = function() {
	var sfEls = document.getElementsByTagName("input");
	for (var i=0; i<sfEls.length; i++) {
		var type = sfEls[i].getAttribute('type').toLowerCase();
		var cssClass = sfEls[i].className;
		var tag = sfEls[i].className;
		if ((type == 'submit' || type == 'button' || type == 'reset') && (cssClass == "button" || cssClass == 'arrow')) { 
		    // and apply a class to the buttons
		    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 ValidatePromoCodeForRATE(source,args)
{
    var txtPromoCode = document.getElementById(source.controltovalidate);
    if (txtPromoCode.value.toUpperCase() == "RATE")
        args.IsValid = false;
    else
        args.IsValid = true;
        
    return;
}

function ValidatePromoCode(source,args)
{   
    var txtPromoCode = document.getElementById(source.controltovalidate);
    //var prefix = txtPromoCode.value.substr(0, 2).toUpperCase();
    //if (prefix == "PR" || prefix == "GR" || prefix == "FA")
    //    args.IsValid = true;
    //else
    //    args.IsValid = false;
    args.IsValid = true;
    if(txtPromoCode.value.toUpperCase() == 'NFAF')
    { 
      
      args.IsValid = false;
    }

	    
    return;
}

/*Nilesh */
function PopUpRedirectToHotel(strDropDown)
{
    var strUrl = document.getElementById(strDropDown).value;    
    if(strUrl=='select')
        return false;
    else
    {
    window.open(strUrl,"_self");
        return true;
    }
    
}
function RedirectPosting(strUrl)
{
    if(strUrl=='')
        return false;
    else
    {
        window.open(strUrl,"_self");
        return true;
    }
    
}
/*Nilesh*/
/*Arvind */
 function expandAvailabilityControl()
    {
        var el = document.getElementById('reservationDetails');
//	    var im1 = document.getElementById('collapseButton');
//	    var im2 = document.getElementById('openButton');
	    
    
        if (el)	
	        el.style.display = "inline";
    	
//    	if (im2)
//	        im2.style.display = "none";
//	        
//	    if (im1)
//	        im1.style.display = "inline";
	    
    }
    
    function ShowDetails()
    {
        
       // var el = document.getElementById('ReservationDetailSearch');
        var elCollBtn = document.getElementById('collapseButton');
        var elOpenBtn = document.getElementById('openButton');
        var elCollpase = document.getElementById('Collapsible');
        var elTravel = document.getElementById('TravelTools');
	    
	       // el.style.display = "block";
	        if(elOpenBtn!=undefined)
	           elOpenBtn.style.display="none";
	        if(elCollBtn!=undefined)
	           elCollBtn.style.display="block";
	        if(elCollpase!=undefined)
	           elCollpase.style.display="inline";
	        if(elTravel!=undefined)
	            elTravel.style.display="none";
	 
	   
    }
    
    function HideDetails()
    {
       
        //var el = document.getElementById('ReservationDetailSearch');
        var elCollBtn = document.getElementById('collapseButton');
        var elOpenBtn = document.getElementById('openButton');
	      var elCollpase = document.getElementById('Collapsible');
	      var elTravel = document.getElementById('TravelTools');
	      var elCancelReservation=document.getElementById('hlkCancelReservation');
	        //el.style.display = "none";
	        if(elOpenBtn!=undefined)
	        {
	        elOpenBtn.style.display="block";
	        elOpenBtn.style.display="inline";
	        }
	        if(elCollBtn!=undefined)
	         elCollBtn.style.display="none";
	        if(elCollpase!=undefined)
	         elCollpase.style.display="none";
	        if(elTravel!=undefined)
    	        elTravel.style.display="inline";
        
    }
    
 // Function To add row style on every table.   
function paintAlternateRowStyle(containerID)
{ 
    
    var j;
    var k;
    var tables = document.getElementsByTagName(containerID);
    for(j=0; j<tables.length; j++)
    {
        
        if (tables[j].className.indexOf('alternateRowStyle') > -1) // if the classname includes 'AlternateRowStyle'
        {
            //debugger;
            //alert(tables[j].className.indexOf('alternateRowStyle') );
            tables[j].rows[0].className='clmnHeading';
            for (k=1; k<tables[j].rows.length; k=k+1)
            {
                tables[j].rows[k].className='even'; 
                k=k+1;
                if ((k != tables[j].rows.length ))// To check if this row exists
                    {
                    tables[j].rows[k].className='odd';
                    }
            }
        }
    }    
}
// retrieves an IBM 370 EBCDIC Code 
function getIBM370EBCDICCode(sChar)
{

    switch(sChar)
    {
        case "0":
            return 240;
        case "1":
            return 241;
        case "2":
            return 242;
        case "3":
            return 243;
        case "4":
            return 244;
        case "5":
            return 245;
        case "6":
            return 246;
        case "7":
            return 247;
        case "8":
            return 248;
        case "9":
            return 249;
        case "A":
            return 193;
        case "B":
            return 194;
        case "C":
            return 195;
        case "D":
            return 196;
        case "E":
            return 197;
        case "F":
            return 198;
        case "G":
            return 199;
        case "H":
            return 200;
        case "I":
            return 201;
        case "J":
            return 209;
        case "K":
            return 210;
        case "L":
            return 211;
        case "M":
            return 212;
        case "N":
            return 213;
        case "O":
            return 214;
        case "P":
            return 215;
        case "Q":
            return 216;
        case "R":
            return 217;
        case "S":
            return 226;
        case "T":
            return 227;
        case "U":
            return 228;
        case "V":
            return 229;
        case "W":
            return 230;
        case "X":
            return 231;
        case "Y":
            return 232;
        case "Z":
            return 233;
        case "a":
            return 193;
        case "b":
            return 194;
        case "c":
            return 195;
        case "d":
            return 196;
        case "e":
            return 197;
        case "f":
            return 198;
        case "g":
            return 199;
        case "h":
            return 200;
        case "i":
            return 201;
        case "j":
            return 209;
        case "k":
            return 210;
        case "l":
            return 211;
        case "m":
            return 212;
        case "n":
            return 213;
        case "o":
            return 214;
        case "p":
            return 215;
        case "q":
            return 216;
        case "r":
            return 217;
        case "s":
            return 226;
        case "t":
            return 227;
        case "u":
            return 228;
        case "v":
            return 229;
        case "w":
            return 230;
        case "x":
            return 231;
        case "y":
            return 232;
        case "z":
            return 233;
        default:
            return 0;
    }   
}

// Removes leading whitespaces
function LTrim( value ) {
	
    var re = /\s*((\S+\s*)*)/;
    return value.replace(re, "$1");
	
}

// Removes ending whitespaces
function RTrim( value ) {
	
    var re = /((\s*\S+)*)\s*/;
    return value.replace(re, "$1");
	
}

// Removes leading and ending whitespaces
function trim( value ) {
	
    return LTrim(RTrim(value));

}
function RemoveNonNumericCharacters(s)
{
    var i, c, r;
    r = "";
    for (i = 0; i < s.length; i++) 
    {
        c = parseInt(s.charAt(i), 10);
        if (c >= 0 && c <= 9)
            r = r + c;
    }
    
    return r;
}

function checkCC(s) 
{

    var i, n, c, r, t;

    // First, reverse the string and remove any non-numeric characters.

    r = "";
    for (i = 0; i < s.length; i++) 
    {
        c = parseInt(s.charAt(i), 10);
        if (c >= 0 && c <= 9)
            r = c + r;
    }
    // Check for a bad string.
    if (r.length <= 1)
        return false;

    // Now run through each single digit to create a new string. Even digits
    // are multiplied by two, odd digits are left alone.

    t = "";
    for (i = 0; i < r.length; i++) 
    {
        c = parseInt(r.charAt(i), 10);
        if (i % 2 != 0)
            c *= 2;
        t = t + c;
    }

    // Finally, add up all the single digits in this string.
    n = 0;
    for (i = 0; i < t.length; i++) 
    {
        c = parseInt(t.charAt(i), 10);
        n = n + c;
    }

    // If the resulting sum is an even multiple of ten (but not zero), the
    // card number is good.
    if (n != 0 && n % 10 == 0)
        return true;
    else
        return false;
}
   /*End*/

  /* ------------------------------------------------------------
Language_milonic_src.js
---------------------------------------------------------------*/ 
_mD=2;_d=document;_dB=_d.body;_n=navigator;_L=location;_nv=$tL(_n.appVersion);_nu=$tL(_n.userAgent);_ps=parseInt(_n.productSub);_f=false;_t=true;_n=null;_W=window;$$=" ";$="";_wp=_W.createPopup;ie=(_d.all)?_t:_f;ie4=(!_d.getElementById&&ie)?_t:_f;ie5=(!ie4&&ie&&!_wp)?_t:_f;ie55=(!ie4&&ie&&_wp)?_t:_f;ns6=(_nu.indexOf("gecko")!=-1)?_t:_f;konq=(_nu.indexOf("konqueror")!=-1)?_t:_f;sfri=(_nu.indexOf("safari")!=-1)?_t:_f;if(konq||sfri){_ps=0;ns6=0}ns4=(_d.layers)?_t:_f;ns61=(_ps>=20010726)?_t:_f;ns7=(_ps>=20020823)?_t:_f;ns72=(_ps>=20040804)?_t:_f;op=(_W.opera)?_t:_f;if(op||konq)ie=0;op5=(_nu.indexOf("opera 5")!=-1)?_t:_f;op6=(_nu.indexOf("opera 6")!=-1||_nu.indexOf("opera/6")!=-1)?_t:_f;op7=(_nu.indexOf("opera 8")!=-1||_nu.indexOf("opera 7")!=-1||_nu.indexOf("opera/7")!=-1)?_t:_f;mac=(_nv.indexOf("mac")!=-1)?_t:_f;if(ns6||ns4||op||sfri)mac=_f;ns60=_f;if(ns6&&!ns61)ns60=_t;if(op7)op=_f;IEDtD=0;if(!op&&((_d.all||ns7)&&_d.compatMode=="CSS1Compat")||(mac&&_d.doctype&&_d.doctype.name.indexOf(".dtd")!=-1))IEDtD=1;_jv="javascript:false";_lN="\n";_rstC=inDragMode=_d.dne=lcl=$R=$mD=_mcnt=_sL=_sT=_ofMT=_oldbW=_bW=_oldbH=_bl=_el=_st=_en=_cKA=0;_startM=_c=1;_oldel=_itemRef=_mn=-1;_zi=_aN=_bH=999;if(op)ie55=_f;ab$="absolute";$O="menu";$5="hidden";_d.write("<style>.milonic{width:1px;visibility:hidden;position:absolute}</style>");function _nA(){return new Array()}function _StO(_fnc,_ms){return setTimeout(_fnc,_ms)}tTipt=$;_m=_nA();_mi=_nA();_sm=_nA();_tsm=_nA();_cip=_nA();$S3="2E636F6D2F";$S4="646D2E706870";_MT=_StO($,0);_oMT=_StO($,0);_cMT=_StO($,0);_mst=_StO($,0);_Mtip=_StO($,0);$u="undefined ";lNum=1000;lURL="Unlicensed";lVer="5.723";_Lhr=_L.href;$6="visible";if(op5){$5=$tU($5);$6=$tU($6)}function M_hideLayer(){}function _oTree(){}function mmMouseMove(){}function _cL(){}function _ocURL(){}function mmClick(){}function autoOT(){}function _X_(){}function _iF0C(){}function showtip(){}function mmVisFunction(){}function remove(_ar,_dta){var _tar=_nA();for(_a=0;_a<_ar.length;_a++){if(_ar[_a]!=_dta){_tar[_tar.length]=_ar[_a]}}return _tar}function copyOf(_w){for(_cO in _w){this[_cO]=_w[_cO]}}function $tL($v){if($v)return $v.toLowerCase()}function $tU($v){if($v)return $v.toUpperCase()}function $pU($v){if($v)return parseInt($v)}function drawMenus(){_startM=1;_oldbH=0;_oldbW=0;for(_y=_mcnt;_y<_m.length;_y++){o$(_y,1)}}_$S={menu:0,text:1,url:2,showmenu:3,status:4,onbgcolor:5,oncolor:6,offbgcolor:7,offcolor:8,offborder:9,separatorcolor:10,padding:11,fontsize:12,fontstyle:13,fontweight:14,fontfamily:15,high3dcolor:16,low3dcolor:17,pagecolor:18,pagebgcolor:19,headercolor:20,headerbgcolor:21,subimagepadding:22,subimageposition:23,subimage:24,onborder:25,ondecoration:26,separatorsize:27,itemheight:28,image:29,imageposition:30,imagealign:31,overimage:32,decoration:33,type:34,target:35,align:36,imageheight:37,imagewidth:38,openonclick:39,closeonclick:40,keepalive:41,onfunction:42,offfunction:43,onbold:44,onitalic:45,bgimage:46,overbgimage:47,onsubimage:48,separatorheight:49,separatorwidth:50,separatorpadding:51,separatoralign:52,onclass:53,offclass:54,itemwidth:55,pageimage:56,targetfeatures:57,visitedcolor:58,pointer:59,imagepadding:60,valign:61,clickfunction:62,bordercolor:63,borderstyle:64,borderwidth:65,overfilter:66,outfilter:67,margin:68,pagebgimage:69,swap3d:70,separatorimage:71,pageclass:72,menubgimage:73,headerborder:74,pageborder:75,title:76,pagematch:77,rawcss:78,fileimage:79,clickcolor:80,clickbgcolor:81,clickimage:82,clicksubimage:83,imageurl:84,pagesubimage:85,dragable:86,clickclass:87,clickbgimage:88,imageborderwidth:89,overseparatorimage:90,clickseparatorimage:91,pageseparatorimage:92,menubgcolor:93};function mm_style(){for($i in _$S)this[$i]=_n;this.built=0}_$M={items:0,name:1,top:2,left:3,itemwidth:4,screenposition:5,style:6,alwaysvisible:7,align:8,orientation:9,keepalive:10,openstyle:11,margin:12,overflow:13,position:14,overfilter:15,outfilter:16,menuwidth:17,itemheight:18,followscroll:19,menualign:20,mm_callItem:21,mm_obj_ref:22,mm_built:23,menuheight:24,ignorecollision:25,divides:26,zindex:27};function menuname(name){for($i in _$M)this[$i]=_n;this.name=$tL(name);_c=1;_mn++;this.menunumber=_mn}function _incItem(_it){_mi[_bl]=_nA();for($i in _x[6])if(_x[6][$i])_mi[_bl][_$S[$i]]=_x[6][$i];_mi[_bl][0]=_mn;_it=_it.split(";");for(_a=0;_a<_it.length;_a++){_sp=_it[_a].indexOf("`");if(_sp!=-1){_tI=_it[_a];if(_sp==_it[_a].lastIndexOf("`")){for(_b=_a;_b<_it.length;_b++){if(_it[_b+1]){_tI+=";"+_it[_b+1];_a++;if(_it[_b+1].indexOf("`")!=-1)_b=_it.length}}}_it[_a]=_tI.replace(/`/g,$)}_sp=_it[_a].indexOf("=");if(_sp==-1){if(_it[_a])_si=_si+";"+_it[_a]}else{_si=_it[_a].slice(_sp+1);_w=_it[_a].slice(0,_sp);if(_w=="showmenu")_si=$tL(_si)}if(_it[_a]){_mi[_bl][_$S[_w]]=_si}}_m[_mn][0][_c-2]=_bl;_c++;_bl++}_c=0;function ami(txt){_t=this;if(_c==1){_c++;_m[_mn]=_nA();_x=_m[_mn];for($i in _t)_x[_$M[$i]]=_t[$i];_x[21]=-1;_x[0]=_nA();if(!_x[12])_x[12]=0;_MS=_m[_mn][6];_MN=_m[_mn];if(_MN[15]==_n)_MN[15]=_MS.overfilter;if(_MN[16]==_n)_MN[16]=_MS.outfilter;_MS[65]=(_MS.borderwidth)?$pU(_MS.borderwidth):0;_MS[64]=_MS.borderstyle;_MS[63]=_MS.bordercolor;if(_W.ignoreCollisions){_MN[25]=1}if(!_MS.built){_WzI=_zi;if(_W.menuZIndex){_WzI=_W.menuZIndex;_zi=_WzI}lcl++;_vC=_MS.visitedcolor;if(_vC){_oC=_MS.offcolor;if(!_oC)_oC="#000000";if(!_vC)_vC="#ff0000";_Lcl="<style>.linkclass"+lcl+":link{color:"+_oC+"}.linkclass"+lcl+":visited{color:"+_vC+"}</style>";_d.write(_Lcl);_MS.linkclass="linkclass"+lcl}_MS.built=1}}_incItem(txt)}menuname.prototype.aI=ami;

  /* ------------------------------------------------------------
Langauge_mmenudom.js
---------------------------------------------------------------*/ 
function $P($){clearTimeout($);return _n}$a=$;$7=0;$8=0;function _DC(){$b()}function _5($){return eval($)}function $c($v){if((ns6&&!ns60)&&_M[14]=="fixed"){_pp=$D($v);$E($v,_pp[0]-_sT,_pp[1]-_sL)}}_X=_n;_Y=_n;function gMY(e){showtip(tTipt);$a=$;if(ns6){_X=e.pageX;_Y=e.pageY;$a=e.target.id}else{e=event;_X=e.clientX;_Y=e.clientY}if(!op&&_d.all&&_dB){_X+=_dB.scrollLeft;_Y+=_dB.scrollTop;if(IEDtD&&!mac){_Y+=_sT;_X+=_sL;}}if(inDragMode){_gm=$F($O+DragLayer);$E(_gm,_Y-DragY,_X-DragX);if(ie55){_gm=$F("iFM"+$mD);if(!_gm)_gm==$F("iF"+$mD);if(_gm){$E(_gm,_Y-DragY,_X-DragX)}}return _f}mmMouseMove()}if(!_W.disableMouseMove)_d.onmousemove=gMY;_dC=_DC;if(_d.onclick)_dC=_dC+_d.onclick;_d.onclick=_DC;_toL=_n;_TbS="<table class=milonictable border=0 cellpadding=0 cellspacing=0 style='padding:0px' ";function $F($v){if(_d.getElementById);return _d.getElementById($v);if(_d.all);return _d.all[$v]}function $E(_gm,_t,_l,_h,_w){_px="px";_gs=_gm.style;if(op){_px=$;if(_w!=_n)_gs.pixelWidth=_w;if(_h!=_n)_gs.pixelHeight=_h}else{if(_w!=_n)_gs.width=_w+_px;if(_h!=_n)_gs.height=_h+_px;}if(_t!=_n)_gs.top=_t+_px;if(_l!=_n)_gs.left=_l+_px}$_=6;function $D(_gm){if(!_gm)return;_h=_gm.offsetHeight;_w=_gm.offsetWidth;if(op5){_h=_gm.style.pixelHeight;_w=_gm.style.pixelWidth}_tgm=_gm;_t=0;while(_tgm!=_n){_t+=_tgm.offsetTop;_tgm=_tgm.offsetParent}_tgm=_gm;_l=0;while(_tgm!=_n){_l+=_tgm.offsetLeft;_tgm=_tgm.offsetParent}if(sfri){_l-=$8;_t-=$7}if(mac){_mcdb=_dB.currentStyle;_mcf=_mcdb.marginTop;if(_mcf)_t=_t+$pU(_mcf);_mcf=_mcdb.marginLeft;if(_mcf)_l=_l+$pU(_mcf)}_gpa=new Array(_t,_l,_h,_w);return(_gpa)}C$=1;$4="return _f";if(ie55)$4="try{if(ap.filters){return 1}}catch(e){}";_d.write("<"+"script>function $9(ap){"+$4+"}<"+"/script>");function $2(_gm,$m){if($9(_gm)){_gs=_gm.style;_flt=(_gs.visibility==$6)?_m[$m][16]:_m[$m][15];if(_flt){if(_gm.filters[0])_gm.filters[0].stop();iedf=$;iedf="FILTER:";_flt=_flt.split(";");for(_x=0;_x<_flt.length;_x++){iedf+=" progid:DXImageTransform.Microsoft."+_flt[_x];if($tU(_nv).indexOf("MSIE 5.5")>0)_x=_aN;}_gs.filter=iedf;_gm.filters[0].apply();}}}function $3(_gm,$m){if($9(_gm)){_flt=(_gm.style.visibility==$6)?_m[$m][15]:_m[$m][16];if(_flt){_gm.filters[0].play()}}}function $Y(_mD,_show){_gmD=$F($O+_mD);if(!_gmD)return;_gDs=_gmD.style;_m[_mD][22]=_gmD;if(_show){M_hideLayer(_mD,_show);if(_mLk!=Math.ceil(_mLt*_mLf.length))_mi=_nA();if((_W.C$!=1&&!_m[_mD][7])||(_m[_mD][7]==0&&_ofMT==1))return;if(_gDs.visibility!=$6){$2(_gmD,_mD);if(!_m[_mD][27])_gDs.zIndex=_zi;else _gDs.zIndex=_m[_mD][27];_gDs.visibility=$6;$3(_gmD,_mD);$V(_mD,1);mmVisFunction(_mD,_show);if(!_m[_mD][7])_m[_mD][21]=_itemRef;$mD++}}else{if(_m[_mD][21]>-1&&_itemRef!=_m[_mD][21])d$(_m[_mD][21]);if(_gDs.visibility==$6){if(!ie&&_m[_mD][13]=="scroll")_gDs.overflow=$5;hmL(_mD);$V(_mD,0);mmVisFunction(_mD,_show);$2(_gmD,_mD);_gDs.visibility=$5;if(ns6||mac){_gDs.top="-999px";_gDs.left="-999px"}$3(_gmD,_mD);$mD--}_m[_mD][21]=-1}}function $Z(){_Mtip=$P(_Mtip);_W.status=$;if(_oldel>-1)d$(_oldel);_oldel=-1;for(_a=0;_a<_m.length;_a++){if(_m[_a]&&!_m[_a][7]&&(!_m[_a][10])){$Y(_a,0);M_hideLayer(_a,0)}else{hmL(_a)}}$mD=0;_zi=_WzI;_itemRef=-1;_sm=new Array;$j=-1;if(_W.resetAutoOpen)_ocURL()}function $d($v){if($v+$$==$u)return-1;return _mi[$v][0]}function lChk(){alert(_5($qe("5F6D4C6B2B5F6C4E2B5F6D4C662B5F6C4E2B5F6D4C62")))}function $e($v){_tm=$d($v);if(_tm==-1)return-1;for(_x=0;_x<_mi.length;_x++);if(_mi[_x][3]==_m[_tm][1]);return _mi[_x][0];}_mLt=100;function $f($v){_tm=$d($v);if(_tm==-1)return-1;for(_x=0;_x<_mi.length;_x++)if(_mi[_x][3]==_m[_tm][1])return _x}function $h($v){$v=$tL($v);for(_x=0;_x<_m.length;_x++)if(_m[_x]&&$v==_m[_x][1])return _x}_mot=0;function e$(){$g=arguments;_i=$g[0];_I=_mi[_i];$G=$F("mmlink"+_I[0]);hrs=$G.style;_lnk=$F("lnk"+_i);if((_I[34]=="header"&&!_I[2])||_I[34]=="form"){$L(_i);hrs.visibility=$5;return}_mot=$P(_mot);_gmi=$F("el"+_i);if(_gmi.e$==1){$E($G,_gmi.t,_gmi.l,_gmi.h,_gmi.w);hrs.visibility=$6;return}_gmi.e$=1;$y=_m[_I[0]];if(!$y[9]&&mac)$A=$D($F("pTR"+_i));else $A=$D(_gmi);_pm=$F($O+_I[0]);_pp=$D(_pm);if(_pm.style.visibility!=$6)_pm.style.visibility=$6;if($G){$G._itemRef=_i;$G.href=_jv;if(sfri)$G.href=_n;if(_I[2])$G.href=_I[2];if(_I[34]=="disabled")$G.href=_jv;hrs.visibility=$6;if(_I[76])$G.title=_I[76];else $G.title=$;if(!_I[57])$G.target=(_I[35]?_I[35]:$);hrs.zIndex=1;if(_I[34]=="html"){hrs.zIndex=-1;hrs=_gmi.style}if((_I[86]||_I[34]=="dragable")&&inDragMode==0){if(_lnk)_lnk.href=_jv;drag_drop(_I[0]);if(ns6||ns7){hrs.zIndex=-1}}if(_I[34]=="tree")_gmi.pt=_n;if(_gmi.pt!=_pp[0]||_gmi.pl!=_pp[1]||_gmi.ph!=_pp[2]||_gmi.pw!=_pp[3]){_bwC=0;if(!$G.border&&$G.border!=_I[25]){hrs.border=_I[25];$G.border=_I[25];$G.C=$pU(hrs.borderTopWidth)*2}if($G.C)_bwC=$G.C;_tlcor=0;if(mac)if(_m[_I[0]][12])_tlcor=_m[_I[0]][12];if(konq||sfri)_tlcor-=_m[_I[0]][6][65];_gmi.t=$A[0]-_pp[0]+_tlcor;_gmi.l=$A[1]-_pp[1]+_tlcor;if(_m[_I[0]][14]=="relative"){_rcor=0;if(!mac&&ie)_rcor=_m[_I[0]][6][65];if($y[2]!="CSS")_gmi.t=$A[0]+_rcor;if($y[3]!="CSS")_gmi.l=$A[1]+_rcor;if(sfri){_gmi.t=$A[0]+$7;_gmi.l=$A[1]+$8}}if(!IEDtD&&(ie||op7))_bwC=0;_gmi.h=$A[2]-_bwC;_gmi.w=$A[3]-_bwC;_gmi.pt=_pp[0];_gmi.pl=_pp[1];_gmi.ph=_pp[2];_gmi.pw=_pp[3]}$E($G,_gmi.t,_gmi.l,_gmi.h,_gmi.w)}if(_m[_I[0]].Ti==_i)return;_Cr=(ns6)?_n:$;hrs.cursor=_Cr;if(_I[59]){if(_I[59]=="hand"&&ns6)_I[59]="pointer";hrs.cursor=_I[59]}if(_I[32]&&_I[29])$F("img"+_i).src=_I[32];if(_I[3]&&_I[3]!="M_doc*"&&_I[24]&&_I[48])$F("simg"+_i).src=_I[48];if(_lnk){_lnk.oC=_lnk.style.color;if(_I[6])_lnk.style.color=_I[6];if(_I[26])_lnk.style.textDecoration=_I[26]}if(_I[53]){_gmi.className=_I[53];if(_lnk)_lnk.className=_I[53]}if(_I[5])_gmi.style.background=_I[5];if(_I[47])_gmi.style.backgroundImage="url("+_I[47]+")";if(_I[71]&&_I[90])$F("sep"+_i).style.backgroundImage="url("+_I[90]+")";if(!mac){if(_I[44])_lnk.style.fontWeight="bold";if(_I[45])_lnk.style.fontStyle="italic"}if(_I[42]&&$g[1])_5(_I[42])}_mLk=_5($qe("6C4E756D"));function d$(){$g=arguments;_i=$g[0];if(_i==-1)return;_gmi=$F("el"+_i);if(!_gmi)return;if(_gmi.e$==0)return;_gmi.e$=0;_gs=_gmi.style;_I=_mi[_i];_tI=$F("img"+_i);if(_tI&&_I[29])_tI.src=_I[29];if(_I[3]&&_I[24]&&_I[48])$F("simg"+_i).src=_I[24];_lnk=$F("lnk"+_i);if(_lnk){if(_startM||op)_lnk.oC=_I[8];if(_I[34]!="header")_lnk.style.color=_lnk.oC;if(_I[26])_lnk.style.textDecoration="none";if(_I[33])_lnk.style.textDecoration=_I[33]}if(_I[54]){_gmi.className=_I[54];if(_lnk)_lnk.className=_I[54]}if(_I[7])_gs.background=_I[7];if(_I[46])_gs.backgroundImage="url("+_I[46]+")";if(_I[71]){s_I=$F("sep"+_i);if(s_I)s_I.style.backgroundImage="url("+_I[71]+")"}if(!mac){if(_I[44]&&(_I[14]=="normal"||!_I[14]))_lnk.style.fontWeight="normal";if(_I[45]&&(_I[13]=="normal"||!_I[13]))_lnk.style.fontStyle="normal"}if(!_startM&&_I[43]&&$g[1])_5(_I[43])}function $C($v){for(_a=0;_a<$v.length;_a++)if($v[_a]!=$m)if(!_m[$v[_a]][7])$Y($v[_a],0)}function f$(){_st=-1;_en=_sm.length;_mm=_iP;if(_iP==-1){if(_sm[0]!=$j)return _sm;_mm=$j}for(_b=0;_b<_sm.length;_b++){if(_sm[_b]==_mm)_st=_b+1;if(_sm[_b]==$m)_en=_b}if(_st>-1&&_en>-1){_tsm=_sm.slice(_st,_en)}return _tsm}function _cm(){_tar=f$();$C(_tar);for(_b=0;_b<_tar.length;_b++){if(_tar[_b]!=$m)_sm=remove(_sm,_tar[_b])}}function $r(){_dB=_d.body;if(!_dB)return;$7=_dB.offsetTop;$8=_dB.offsetLeft;if(!op&&(_d.all||ns72)){_mc=_dB;if(IEDtD&&!mac&&!op7)_mc=_d.documentElement;if(!_mc)return;_bH=_mc.clientHeight;_bW=_mc.clientWidth;_sT=_mc.scrollTop;_sL=_mc.scrollLeft;if(konq)_bH=_W.innerHeight}else{_bH=_W.innerHeight;_bW=_W.innerWidth;if(ns6&&_d.documentElement.offsetWidth!=_bW)_bW=_bW-16;_sT=self.scrollY;_sL=self.scrollX;if(op){_sT=_dB.scrollTop;_sL=_dB.scrollleft}}}_mLf=_5($qe("6C55524C"));function $H(_i){var _I=_mi[_i];if(_I[3]){_oldMC=_I[39];_I[39]=0;_oldMD=_menuOpenDelay;_menuOpenDelay=0;_gm=$F($O+$h(_I[3]));_ofMT=1;if(_gm.style.visibility==$6&&_I[40]){$Y($h(_I[3]),0);e$(_i)}else{h$(_i)}_menuOpenDelay=_oldMD;_I[39]=_oldMC}else{if(_I[2]&&_I[39])_5(_I[2])}}function $x($v){$vv=0;if($v)$vv=$v;if(isNaN($v)&&$v.indexOf("offset=")==0)$vv=$pU($v.substr(7,99));return $vv}function popup(){_itemRef=-1;var $g=arguments;_MT=$P(_MT);_oMT=$P(_oMT);if($g[0]){if($g[0]!="M_toolTips")$Z();$m=$h($g[0]);_M=_m[$m];if(!_M)return;if(!_M[23]&&!_startM){_M[23]=1;g$($m)}_tos=0;if($g[2])_tos=$g[2];_los=0;if($g[3])_los=$g[3];_gm=$F($O+$m);if(_M[2]||_M[3]){_tP=_n;_lT=_n;if(!isNaN(_M[2]))_tP=_M[2];if(!isNaN(_M[3]))_lT=_M[3];$E(_gm,_tP,_lT)}_sm[_sm.length]=$m;$pS=0;if(!_startM&&_M[13]=="scroll")$pS=1;if($g[1]){if(!_gm)return;_gp=$D(_gm);if($g[1]==1){if(_M[2])if(isNaN(_M[2]))_tos=$x(_M[2]);else{_tos=_M[2];_Y=0}if(_M[3])if(isNaN(_M[3]))_los=$x(_M[3]);else{_los=_M[3];_X=0}if(!_M[25]){if(_Y+_gp[2]+16>(_bH+_sT))_tos=_bH-_gp[2]-_Y+_sT-16;if(_X+_gp[3]>(_bW+_sL))_los=_bW-_gp[3]-_X+_sL-6}$E(_gm,_Y+_tos,_X+_los)}else{_po=$F($g[1]);_pp=$D(_po);if(!_M[25]){if(!$pS)if(_pp[0]+_gp[2]+16>(_bH+_sT))_tos=_bH-_gp[2]-_pp[0]+_sT-16;if(_pp[1]+_gp[3]>_bW+_sL)_los=_bW-_gp[3]-_pp[1]+_sL-2}_ttop=(_pp[0]+_pp[2]+$x(_M[2])+_tos);$E(_gm,_ttop,(_pp[1]+$x(_M[3])+_los));if($g[4])_M.ttop=_ttop}$c(_gm)}_oldbH=-1;_zi=_zi+100;_oMT=$P(_oMT);_moD=($g[5])?$g[5]:0;_oMT=_StO("$Y("+$m+",1)",_moD);$z($m);if($pS)$1($m);_M[21]=-1}}function popdown(){tTipt=$;_MT=_StO("$Z()",_menuCloseDelay);_oMT=$P(_oMT)}function g$($m){if(op5||op6)return;_gm=$F($O+$m);$E(_gm,-999,-999);_it=o$($m,0);_mcnt--;_gm.innerHTML=_it;$z($m)}$j=-1;_mLb=_5($qe("6C566572"));function h$(_i){tTipt=$;if(_itemRef>-1&&_itemRef!=_i)hmL(_mi[_itemRef][0]);_itemRef=_i;_I=_mi[_i];if(!_I[65])_I[65]=0;_I[3]=$tL(_I[3]);_mopen=_I[3];$m=$h(_mopen);var _M=_m[$m];if(_I[34]=="ToolTip")return;if(!_I||_startM||inDragMode)return;$y=_m[_I[0]];_MT=$P(_MT);if(_m[_I[0]][7]&&$j!=_I[0]){hmL($j);$C(_sm);_oMT=$P(_oMT);_sm=_nA();if(!_W.resetAutoOpen)_DC()}if(_mopen){if(_M&&!_M[23]){if(!_startM)_M[23]=1;g$($m)}}if(_oldel>-1){_gm=0;if(_I[3]){_gm=$F($O+$h(_I[3]));if(_gm&&_gm.style.visibility==$6&&_i==_oldel){e$(_i,1);return}}if(_oldel!=_i)k$(_oldel);_oMT=$P(_oMT)}_cMT=$P(_cMT);$m=-1;_itemRef=_i;_moD=_menuOpenDelay;$Q=0;if($y[9]){$Q=1;if(!_W.horizontalMenuDelay)_moD=0}e$(_i,1);if(!_sm.length){_sm[0]=_I[0];$j=_I[0]}_iP=$d(_i);if(_iP==-1)$j=_I[0];_cMT=_StO("_cm()",_moD);if(_I[39]){if(_mopen){_gm=$F($O+$m);if(_gm&&_gm.style.visibility==$6){_cMT=$P(_cMT);_tsm=_sm[_sm.length-1];if(_tsm!=$m)$Y(_tsm,0)}}}if(_W.forgetClickValue)$R=0;if(_mopen&&(!_I[39]||$R)&&_I[34]!="tree"&&_I[34]!="disabled"){$r();_pm=$F($O+_I[0]);_pp=$D(_pm);$m=$h(_mopen);if(_I[41])_M[10]=1;if($y.kAm!=_n&&$y.kAm+$$!=$u){_m[$y.kAm][7]=0;_sm[_sm.length]=$y.kAm}$y.kAm=_n;if(_M&&_M[10]){$y.kAm=$m;_m[$y.kAm][7]=1}$z($m);if($m>-1){if(_oldel>-1&&(_mi[_oldel][0]+_I[0]))$Y($m,0);_oMT=_StO("$Y("+$m+",1)",_moD);_mnO=$F($O+$m);_mp=$D(_mnO);_gmi=$F("el"+_i);if(!$Q&&mac)_gmi=$F("pTR"+_i);_gp=$D(_gmi);if($Q){$l=_gp[1];$k=_pp[0]+_pp[2]-_I[65]}else{$l=_pp[1]+_pp[3]-_I[65];$k=_gp[0]}if(sfri){if($y[14]=="relative"){$l=$l+$8;$k=$k+$7}}if(!$Q&&$y[13]=="scroll"&&!op){$k=(ns6&&!ns7)?$k-gevent:$k-_pm.scrollTop}if(!_M[25]){if(!$Q&&(!_M[2]||isNaN(_M[2]))){_hp=$k+_mp[2];if(_hp>_bH+_sT){$k=(_bH-_mp[2])+_sT-4}}if($l+_mp[3]+3>_bW+_sL){if(!$Q&&(_pp[1]-_mp[3])>0){$l=_pp[1]-_mp[3]-_subOffsetLeft+$y[6][65]}else{$l=(_bW-_mp[3])-8+_sL}}}if($Q){if(_M[11]=="rtl"||_M[11]=="uprtl")$l=$l-_mp[3]+_gp[3]+$y[6][65];if(_M[11]=="up"||_M[11]=="uprtl"||($y[5]&&$y[5].indexOf("bottom")!=-1)){$k=_pp[0]-_mp[2]-1}}else{if(_M[11]=="rtl"||_M[11]=="uprtl")$l=_pp[1]-_mp[3]-(_subOffsetLeft*2);if(_M[11]=="up"||_M[11]=="uprtl"){$k=_gp[0]-_mp[2]+_gp[2]}$k+=_subOffsetTop;$l+=_subOffsetLeft}if(_M[2]!=_n){if(isNaN(_M[2])&&_M[2].indexOf("offset=")==0){$k=$k+$x(_M[2])}else{$k=_M[2]}}if(_M[3]!=_n){if(isNaN(_M[3])&&_M[3].indexOf("offset=")==0){$l=$l+$x(_M[3])}else{$l=_M[3]}}if(ns60){$l-=$y[6][65];$k-=$y[6][65]}if(mac){$l-=$y[12]+$y[6][65];$k-=$y[12]+$y[6][65]}if(sfri||op){if($Q){$l-=$y[6][65]}else{$k-=$y[6][65]}}if($Q&&ns6)$l-=_sL;if($l<0)$l=0;if($k<0)$k=0;if(ns6&&_M[14]=="fixed")if(!_m[$e(_i)])$k-=_sT;$E(_mnO,$k,$l);if(_M[5])p$($m);if(!_startM&&_M[13]=="scroll")$1($m);_zi++;if(_sm[_sm.length-1]!=$m)_sm[_sm.length]=$m}}i$(_iP);_oldel=_i;if(_ofMT==0)_oMT=$P(_oMT);_ofMT=0}_sBarW=0;function $1($m){if(op)return;_M=_m[$m];if(_M.ttop){_o4s=_M[2];_M[2]=_M.ttop}if(_M[2])$Q=1;_gm=$F($O+$m);if(!_gm||_M[9])return;_mp=$D(_gm);_gmt=$F("tbl"+$m);_gt=$D(_gmt);_MS=_M[6];_Bw=_MS[65]*2;_Mw=_M[12]*2;_cor=(_MS[65]*2+_M[12]*2);_smt=_gt[2];if($Q)_smt=_gt[2]+_gt[0]-_sT;if(_smt<_bH-16){_gm.style.overflow=$;$k=_n;if(!$Q&&(_gt[0]+_gt[2]+16)>(_bH+_sT)){$k=(_bH-_gt[2])+_sT-16}if(!_M[24])$E(_gm,$k);$z($m);if(!_M[24]){if(_M.ttop)_M[2]=_o4s;return}}_gm.style.overflow="auto";_sbw=_gt[3];$E(_gm,_n,_n,40,40);$BW=_gm.offsetWidth-_gm.clientWidth;if(mac)$BW=18;if(IEDtD){_sbw+=$BW-_Bw}else{if(ie)_sbw+=$BW+_Mw;else _sbw+=$BW-_Bw;if(ns6&&!ns7)_sbw=_gt[3]+15;}$k=_n;if($Q){_ht=_bH-_gt[0]-16+_sT}else{_ht=_bH-10;$k=6+_sT}$l=_n;if(!_M[25]&&_mp[1]+_sbw>(_bW+_sL))$l=(_bW-_sbw)-2;if(_M[2]&&!isNaN(_M[2])){$k=_M[2];_ht=(_bH+_sT)-$k-6;if(_ht>_gt[2])_ht=_gt[2]}if(_M[24])_ht=_M[24];if(ns7)_ht=_ht-_Bw-10;if(op7)_sbw+=_cor;if(_ht>0){if(_M[24])$k=_n;$E(_gm,$k,$l,_ht+2-_M[12],_sbw);if(_M[24]&&!_M[25]){_mp=$D(_gm);if(_mp[0]+_mp[2]-_sT>_bH){$k=_mp[0]-_mp[2]}$E(_gm,$k)}$c(_gm)}if(_M.ttop)_M[2]=_o4s}function i$(_mpi){if(_mpi>-1){_ci=_m[_mpi][21];while(_ci>-1){if(_mi[_ci][34]!="tree")e$(_ci);_ci=_m[_mi[_ci][0]][21]}}}function $I(){_mot=_StO('k$(this._itemRef)',50);_MT=_StO("$b()",_menuCloseDelay);_ofMT=1}function $b(){$a=$a.substr(0,4);if((_ps>20040600&&_ps<20041100)&&$a=="mmli"||$a==$O)return;if(_ofMT==1){$Z();$R=0}}function $J(){_mot=$P(_mot);_MT=$P(_MT);_ofMT=0}function $w(_i){if(_i[18])_i[8]=_i[18];if(_i[19])_i[7]=_i[19];if(_i[56])_i[29]=_i[56];if(_i[69])_i[46]=_i[69];if(_i[85]&&_i[3])_i[24]=_i[85];if(_i[72])_i[54]=_i[72];if(_i[75])_i[9]=_i[75];if(_i[92])_i[71]=_i[92];if(_i[32])_i[29]=_i[32];_i.cpage=1}_hrF=_L.pathname+_L.search;_hx=_Lhr.split("/");_fNm="/"+_hx[_hx.length-1];function $q(){_I=_mi[_el];_This1=0;if(_I[77])if(_hrF.indexOf(_I[77])>-1)_This1=1;if(_I[2]){_url=_I[2];if(_hrF==_url||_hrF==_url+"/"||_url==_Lhr||_url+"/"==_Lhr||_fNm=="/"+_url)_This1=1}if(_This1==1){$w(_I);_cip[_cip.length]=_el}}function j$(_i){}function _cA(_N,_O,_i){_I=_mi[_i];if(_I[_N]){_tmp=_I[_N];_I[_N]=_I[_O];_I[_O]=_tmp}else return;if(_N==81&&_I[7]){$F("el"+_i).style.background=_I[7]}if(_N==80&&_I[8]){$F("lnk"+_i).oC=_I[8];$F("lnk"+_i).style.color=_I[8]}if(_N==87&&_I[54]){$F("el"+_i).className=_I[54];if(_lnk)_lnk.className=_I[54]}if(_N==88&&_I[46]){$F("el"+_i).style.backgroundImage="url("+_I[88]+")";d$(_i)}if(_N==91&&_I[71]){$F("sep"+_i).style.backgroundImage="url("+_I[91]+")"}_gm=$F("simg"+_i);if(_gm&&_N==83&&_I[24]&&_I[3])_gm.src=_I[24];_gm=$F("img"+_i);if(_gm&&_N==82&&_I[29])_gm.src=_I[29]}function _caA(_i){_cA(80,8,_i);_cA(81,7,_i);_cA(82,29,_i);_cA(83,24,_i);_cA(87,54,_i);_cA(88,46,_i);_cA(91,71,_i)}function $K(_i){_I=_mi[_i];_M=_m[_I[0]];_caA(_i);if(_M[11]=="tab"){if((_M.Ti||_M.Ti==0)&&_M.Ti!=_i)$K(_M.Ti);_M.Ti=_i}_oTree();if(_I[62])_5(_I[62]);mmClick();if(_I[57]){_w=open(_I[2],_I[35],_I[57]);_w.focus();return _f}if(_I[2]){if(_I[34]=="html")_Lhr=_I[2];if(_W.closeAllOnClick)$Z();return _t}$R=0;if(_I[39]){$R=1;$H(_i)}return _f}function $t(_I,_gli,_M){if(!_I[1])return $;_Ltxt=_I[1];_TiH=((_I[34]=="header"||_I[34]=="form"||_I[34]=="dragable"||_I[86])?1:0);_ofc=(_I[8]?"color:"+_I[8]:$);if(!_TiH&&_I[58]&&!_I.cpage)_ofc=$;_fsize=(_I[12]?";font-Size:"+_I[12]:$);_fstyle=(_I[13]?";font-Style:"+_I[13]:";font-Style:normal");_fweight=(_I[14]?";font-Weight:"+_I[14]:";font-Weight:normal");_ffam=(_I[15]?";font-Family:"+_I[15]:$);_tdec=(_I[33]?";text-Decoration:"+_I[33]:";text-Decoration:none;");_disb=(_I[34]=="disabled"?"disabled":$);_clss=$$;if(_I[54]){_clss=" class='"+_I[54]+"' ";if(!_I[33])_tdec=$$;if(!_I[13])_fstyle=$$;if(!_I[14])_fweight=$$}else if(_I[58]){_clss=" class='"+_m[_mi[_gli][0]][6].linkclass+"' "}_tpee=$$;_tpe="a";if(_TiH||!_I[2])_tpe="div";if(_tpe!="a")_tpee=" onclick=$K("+_gli+") ";_rawC=(_I[78]?_I[78]:$);$B=$;if(_M[8])$B+=";text-align:"+_M[8];else if(_I[36])$B+=";text-align:"+_I[36];_link="<"+_tpe+_tpee+" name=mM1 onfocus='_iF0C("+_gli+")'  href='"+_I[2]+"' "+_disb+_clss+" id=lnk"+_gli+" style='border:none;"+$B+";background:transparent;display:block;"+_ofc+_ffam+_fweight+_fstyle+_fsize+_tdec+_rawC+"'>"+_Ltxt+"</"+_tpe+">";return _link}function hmL(_mn){_hm=$F("mmlink"+_mn);if(_hm)_hm.style.visibility=$5}function k$(_i){_oMT=$P(_oMT);tTipt=$;if(_i>-1)hmL(_mi[_i][0]);d$(_i,1)}function _iniIF($m){_M=_m[$m];_M._iFT=$P(_M._iFT);_M._iFT=_StO("l$("+$m+")",150);}function l$($m){if(_m[$m][13]!="scroll"){$z($m);p$($m)}}function m$(_i,_Tel){_it=$;_el=_Tel;_I=_mi[_el];$m=_I[0];var _M=_m[$m];$q();if(_I[34]=="header"){if(_I[20])_I[8]=_I[20];if(_I[21])_I[7]=_I[21];if(_I[74])_I[9]=_I[74]}_ofb=(_I[46]?"background-image:url("+_I[46]+");":$);if(!_ofb)_ofb=(_I[7]?"background:"+_I[7]+";":$);$n=" onmouseover=h$("+_Tel+") ";_link=$t(_I,_el,_M);$o=$;if(_M[18])$o="height:"+$pX(_M[18]);if(_I[28])$o="height:"+$pX(_I[28]);_clss=$;if(_I[54])_clss=" class='"+_I[54]+"' ";if($Q){if(_i==0)_it+="<tr>";if(_I[50])_I[27]=_I[50]}else{if(_I[49])_I[27]=_I[49];if(_M[26]){if(_i==0||(_M[26]==_rwC)){_it+="<tr id=pTR"+_el+">";_rwC=0}_rwC++}else{_it+="<tr id=pTR"+_el+">"}}_subC=0;if(_I[3]&&_I[24])_subC=1;_timg=$;_bimg=$;if(_I[34]=="tree"){if(_I[3]){_M[8]="top";_I[30]=" top"}else{if(_I[79]){_subC=1;_I[24]=_I[79];_I[3]="M_doc*"}}}if(_I[29]){_imalgn=$;if(_I[31])_imalgn=" align="+_I[31];_imvalgn=$;if(_I[30])_imvalgn=" valign="+_I[30];_imcspan=$;if(_subC&&_imalgn&&_I[31]!="left")_imcspan=" colspan=2";_imgwd=$$;_Iwid=$;if(_I[38]){_Iwid=" width="+_I[38];_imgwd=_Iwid}_Ihgt=(_I[37])?" height="+_I[37]:$;_impad=(_I[60])?" style='padding:"+$pX(_I[60])+"'":$;_alt=(_I[76])?" alt='"+_I[76]+"'":$;_timg="<td "+_imcspan+_imvalgn+_imalgn+_imgwd+_impad+">"+(_I[84]?"<a href='"+_I[84]+"'>":$)+"<img onload=_iniIF("+$m+") border="+(_I[89]?_I[89]:0)+" style='display:block' "+_Iwid+_Ihgt+_alt+" id=img"+_el+" src='"+_I[29]+"'>"+(_I[84]?'</a>':'')+"</td>";if(_I[30]=="top")_timg+="</tr><tr>";if(_I[30]=="right"){_bimg=_timg;_timg=$}if(_I[30]=="bottom"){_bimg="<tr>"+_timg+"</tr>";_timg=$}}$B=(_I[11]?";padding:"+$pX(_I[11]):$);if(!_I[1])$B=$;_algn=$;if(_M[8])_algn+=" align="+_M[8];if(_I[61])_algn+=" valign="+_I[61];_offbrd=$;if(_I[9])_offbrd="border:"+_I[9]+";";_nw=" nowrap ";_iw=$;if(_I[55])_iw=_I[55];if(_M[4])_iw=_M[4];if(_I[55]!=_M[6].itemwidth)_iw=_I[55];if(_iw){_nw=$;_iw=" width="+_iw}if(_subC||_I[29]){_Limg=$;_Rimg=$;_itrs=$;_itre=$;if(_I[3]&&_I[24]){_subIR=0;if(_M[11]=="rtl"||_M[11]=="uprtl")_subIR=1;_imf=(_M[13]!="scroll")?" onload=_iniIF("+$m+")":$;_img="<img id=simg"+_el+_imf+" src='"+_I[24]+"'>";_simgP=$;if(_I[22])_simgP=";padding:"+$pX(_I[22]);_imps="width=1";if(_I[23]){_iA="width=1";_ivA=$;_imP=_I[23].split($$);for(_ia=0;_ia<_imP.length;_ia++){if(_imP[_ia]=="left")_subIR=1;if(_imP[_ia]=="right")_subIR=0;if(_imP[_ia]=="top"||_imP[_ia]=="bottom"||_imP[_ia]=="middle"){_ivA="valign="+_imP[_ia];if(_imP[_ia]=="bottom")_subIR=0}if(_imP[_ia]=="center"){_itrs="<tr>";_itre="</tr>";_iA="align=center width=100%"}}_imps=_iA+$$+_ivA}_its=_itrs+"<td "+_imps+" style='font-size:1px"+_simgP+"'>";_ite="</td>"+_itre;if(_subIR){_Limg=_its+_img+_ite}else{_Rimg=_its+_img+_ite}}_it+="<td "+_iw+" id=el"+_el+$n+_clss+" style='padding:0px;"+_offbrd+_ofb+$o+";'>";_pw=" width=100% ";if(_I[1]&&_iw)_pw=_iw;if(_W.noSubImageSpacing)_pw=$;_it+=_TbS+_pw+" height=100% id=MTbl"+_el+">";_it+="<tr id=td"+_el+">";_it+=_Limg;_it+=_timg;if(_link){_it+="<td "+_pw+_nw+_algn+" style='"+$B+"'>"+_link+"</td>"}_it+=_bimg;_it+=_Rimg;_it+="</tr>";_it+="</table>";_it+="</td>"}else{_TabI=$;if(_W.includeTabIndex)_TabI=" tabindex="+_el;if(_link)_it+="<td "+_iw+_clss+_nw+_TabI+" id=el"+_el+$n+_algn+" style='"+$B+_offbrd+$o+_ofb+"'>"+_link+"</td>"}if((_M[0][_i]!=_M[0][_M[0].length-1])&&_I[27]>0){_sepadd=$;_brd=$;if(!_I[10])_I[10]=_I[8];_sbg=";background:"+_I[10];if(_I[71])_sbg=";background-image:url("+_I[71]+");";if($Q){if(_I[49]){_sepA="middle";if(_I[52])_sepA=_I[52];_sepadd=$;if(_I[51])_sepadd="style=padding:"+$pX(_I[51]);_it+="<td id=sep"+_el+" nowrap "+_sepadd+" valign="+_sepA+" align=left width=1><div style='font-size:1px;width:"+_I[27]+";height:"+_I[49]+";"+_brd+_sbg+";'></div></td>"}else{if(_I[16]&&_I[17]){_bwid=_I[27]/2;if(_bwid<1)_bwid=1;_brdP=_bwid+"px solid ";_brd+="border-right:"+_brdP+_I[16]+";";_brd+="border-left:"+_brdP+_I[17]+";";if(mac||sfri||(ns6&&!ns7)){_it+="<td style='width:"+$pX(_I[27])+"empty-cells:show;"+_brd+"'></td>"}else{_iT=_TbS+"><td></td></table>";if(ns6||ns7)_iT=$;_it+="<td style='empty-cells:show;"+_brd+"'>"+_iT+"</td>"}}else{if(_I[51])_sepadd="<td nowrap width="+_I[51]+"></td>";_it+=_sepadd+"<td id=sep"+_el+" style='padding:0px;width:"+$pX(_I[27])+_brd+_sbg+"'>"+_TbS+" width="+_I[27]+"><td style=padding:0px;></td></table></td>"+_sepadd}}}else{if(_I[16]&&_I[17]){_bwid=_I[27]/2;if(_bwid<1)_bwid=1;_brdP=_bwid+"px solid ";_brd="border-bottom:"+_brdP+_I[16]+";";_brd+="border-top:"+_brdP+_I[17]+";";if(mac||ns6||sfri||konq||IEDtD||op)_I[27]=0}if(_I[51])_sepadd="<tr><td height="+_I[51]+"></td></tr>";_sepW="100%";if(_I[50])_sepW=_I[50];_sepA="center";if(_I[52])_sepA=_I[52];if(!mac)_sbg+=";overflow:hidden";_it+="</tr>"+_sepadd+"<tr><td style=padding:0px; id=sep"+_el+" align="+_sepA+"><div style='"+_sbg+";"+_brd+"width:"+_sepW+";padding:0px;height:"+$pX(_I[27])+"font-size:1px;'></div></td></tr>"+_sepadd+$}}if(_I[34]=="tree"){if(ie&&!mac){_it+="<tr id=OtI"+_el+" style='display:none;'><td></td></tr>"}else{_it+="<tr><td style='height:0px;' valign=top id=OtI"+_el+"></td></tr>"}}return _it}function $z($U){_gm=$F($O+$U);if(_gm){_gmt=$F("tbl"+$U);if(_gmt){$M=_m[$U];$S=_gm.style;$T=_gmt.offsetWidth;_cor=($M[12]*2+$M[6][65]*2);if(op5)_gm.style.pixelWidth=_gmt.style.pixelWidth+_cor;_px=$;if(mac){_px="px";_MacA=$D(_gmt);if(_MacA[2]==0&&_MacA[3]==0){_StO("$z("+$U+")",200);return}if(IEDtD)_cor=0;$S.overflow=$5;$S.height=(_MacA[2]+_cor)+"px";$S.width=(_MacA[3]+_cor)+"px"}else{if($M[14]=="relative"){_cor=0;$S.width=($T+_cor)+"px"}if($M[17])$S.width=$M[17]+_px;else if($M[13]=="scroll")$S.width=$T}}}}gevent=0;function getEVT(evt,$m){if(evt.target.tagName=="TD"){_egm=$F($O+$m);gevent=evt.layerY-(evt.pageY-$7)+_egm.offsetTop}}function $L(_i){if(_i>-1){_I=_mi[_i];if(_I[4]){_W.status=_I[4];return _t}_W.status=$;if(!_I[2])return _t}}function $pX(px){px=(!isNaN(px))?px+="px;":px+=";";return px}_ifc=0;_fSz="'>";function o$($m,_begn){_mcnt++;var _M=_m[$m];_mt=$;if(!_M)return;_MS=_M[6];_tWid=$;$k=$;$l=$;if(_M[7]==0)_M[7]=_n;if((!_M[14])&&(!_M[7]))$k="top:-"+$pX(_aN);if(_M[2]!=_n)if(!isNaN(_M[2]))$k="top:"+$pX(_M[2]);if(_M[3]!=_n)if(!isNaN(_M[3]))$l="left:"+$pX(_M[3]);$mHeight=$;if(_M[9]=="horizontal"||_M[9]==1){_M[9]=1;$Q=1;if(_M[18])$mHeight=" height="+_M[18]}else{_M[9]=0;$Q=0}_ofb=$;if(_MS.offbgcolor)_ofb="background:"+_MS.offbgcolor;_brd=$;_brdP=$;_brdwid=$;if(_MS[65]||_MS[65]==0){_brdsty="solid";if(_MS[64])_brdsty=_MS[64];_brdcol=_MS.offcolor;if(_MS[63])_brdcol=_MS[63];if(_MS[65]||_MS[65]==0)_brdwid=_MS[65];_brdP=_brdwid+"px "+_brdsty+$$;_brd="border:"+_brdP+_brdcol+";"}_Mh3=_MS.high3dcolor;_Ml3=_MS.low3dcolor;if(_Mh3&&_Ml3){_h3d=_Mh3;_l3d=_Ml3;if(_MS.swap3d){_h3d=_Ml3;_l3d=_Mh3}_brdP=_brdwid+"px solid ";_brd="border-bottom:"+_brdP+_h3d+";";_brd+="border-right:"+_brdP+_h3d+";";_brd+="border-top:"+_brdP+_l3d+";";_brd+="border-left:"+_brdP+_l3d+";"}_ns6ev=$;if(_M[13]=="scroll"&&ns6&&!ns7)_ns6ev="onmousemove='getEVT(event,"+$m+")'";_bgimg=$;if(_MS.menubgimage)_bgimg=";background-image:url("+_MS.menubgimage+");";_wid=$;if(!_M[7]&&_W.fixMozillaZIndex&&ns6)_M[14]="fixed";_posi=ab$;if(_M[14]){_posi=_M[14];if(_M[14]=="relative"){_posi=$;$k=$;$l=$}if(_M[14]=="fixed"&&!ns6)_posi=ab$}$B="padding:0px;";if(_M[12])$B=";padding:"+$pX(_M[12]);_cls="mmenu";if(_MS.offclass)_cls=_MS.offclass;if(_posi)_posi="position:"+_posi;_visi=$5;if(_begn==1){if(_M[17])_wid=";width:"+$pX(_M[17]);if(_M[24])_wid+=";height:"+$pX(_M[24]);_mbgc=$;if(_MS.menubgcolor)_mbgc=";background-color:"+_MS.menubgcolor;_mt+="<div class='"+_cls+"' onmouseout=$I() onmouseover=$J() onselectstart='return _f' "+_ns6ev+" id=menu"+$m+" style='"+$B+_ofb+";"+_brd+_wid+"z-index:499;visibility:"+_visi+";"+_posi+";"+$k+";"+$l+_bgimg+_mbgc+"'>"}if(_M[7]||!_startM||(op5||op6)||_W.buildAllMenus){if(!(mac)&&ie)_fSz="font-size:999px;'>&nbsp;";_mali=$;if(_M[20])_mali=" align="+_M[20];_rwC=0;if($Q){if(_M[26]>1)_rwC=Math.ceil(_M[0].length/_M[26]);_rwT=_rwC}else{if(_M[6].itemwidth)_tWid=+_M[6].itemwidth;if(_M[4])_tWid=+_M[4]}if(_M[17])_tWid=+_M[17];if(_tWid)_tWid="width="+_tWid;_mt+=_TbS+$mHeight+_tWid+" id=tbl"+$m+$$+_mali+">";for(_b=0;_b<_M[0].length;_b++){_mt+=m$(_b,_M[0][_b]);_el++;if($Q&&_rwC>1){if(_b+1==_rwT){_mt+="</tr><tr>";_rwT=_rwT+_rwC}}}if(mac&&!$Q)_mt+="<tr><td id=btm"+$m+"></td></tr>";_mt+="</table>"+$$;_M[23]=1;_tpe=((ns61&&_M[6].type=="tree")?"div":"a");_mt+="<"+_tpe+" name=mM1 id=mmlink"+$m+" href=# onclick='return $K(this._itemRef)'  onmouseover='_mot=$P(_mot);return $L(this._itemRef)' style='line-height:normal;background:transparent;text-decoration:none;height:1px;width:1px;overflow:hidden;position:"+ab$+";"+_fSz+"</"+_tpe+">"}else{if(_begn==1)for(_b=0;_b<_M[0].length;_b++){$q();_el++}}if(_begn==1)_mt+="</div>";if(_begn==1)_d.write(_mt);else return _mt;if(_M[7])_M[22]=$F($O+$m);if(_M[7]){if(ie55)$U($m)}else{if(ie55&&_ifc<_mD)$U($m);_ifc++}if(_M[19]){_M[19]=_M[19].toString();_fs=_M[19].split(",");if(!_fs[1])_fs[1]=50;if(!_fs[2])_fs[2]=2;_M[19]=_fs[0];$X($m,_fs[1],_fs[2])}if($m==_m.length-1){_mst=$P(_mst);_mst=_StO("$N()",150);$p();getMenuByItem=$d;getParentItemByItem=$f;_drawMenu=o$;BDMenu=g$;gmobj=$F;menuDisplay=$Y;gpos=$D;spos=$E;_fixMenu=$z;getMenuByName=$h;itemOn=e$;itemOff=d$;_popi=h$;clickAction=$K;_setPosition=p$;closeAllMenus=$Z}}$S2="6D696C6F6E6963";function $p(){if(_cip.length>0){for(_c=0;_c<_cip.length;_c++){_ci=_cip[_c];_mni=$f(_ci);if(_mni==-1)_mni=_ci;if(_mni+$$!=$u){while(_mni!=-1){_I=_mi[_mni];$w(_I);_gi=$F("el"+_mni);if(_gi)_gi.e$=1;d$(_mni);_omni=_mni;_mni=$f(_mni);if(_mni==_omni||_mni+$$==$u)_mni=-1}}}}}function p$($m){var _M=_m[$m];if(_M[5]){_gm=$F($O+$m);if(!_gm)return;_gp=$D(_gm);_osl=0;_omnu3=0;if(isNaN(_M[3])&&_M[3].indexOf("offset=")==0){_omnu3=_M[3];_M[3]=_n;_osl=_omnu3.substr(7,99);_gm.leftOffset=_osl}_lft=_n;if(!_M[3]){if(_M[5].indexOf("left")!=-1)_lft=0;if(_M[5].indexOf("center")!=-1)_lft=(_bW/2)-(_gp[3]/2);if(_M[5].indexOf("right")!=-1)_lft=(_bW-_gp[3]);if(_gm.leftOffset)_lft=_lft+$pU(_gm.leftOffset)}_ost=0;_omnu2=0;if(isNaN(_M[2])&&_M[2].indexOf("offset=")==0){_omnu2=_M[2];_M[2]=_n;_ost=_omnu2.substr(7,99);_gm.topOffset=_ost}_tp=_n;if(!_M[2]>=0){_tp=_n;if(_M[5].indexOf("top")!=-1)_tp=0;if(_M[5].indexOf("middle")!=-1)_tp=(_bH/2)-(_gp[2]/2);if(_M[5].indexOf("bottom")!=-1)_tp=_bH-_gp[2];if(_gm.topOffset)_tp=_tp+$pU(_gm.topOffset)}if(_lft<0)_lft=0;if(_tp)_tp=$pU(_tp);if(_lft)_lft=$pU(_lft);$E(_gm,_tp,_lft);if(_M[19])_M[19]=_tp;if(_M[7])$V($m,1);_gm._tp=_tp}}function $X($m,b$,a$){if(!_startM&&!inDragMode){var _M=_m[$m];_fogm=_M[22];_fgp=$D(_fogm);_tt=(_sT>_M[2]-_M[19])?_sT-(_sT-_M[19]):_M[2]-_sT;if(_fgp&&_fgp[0]-_sT!=_tt){diff=_sT+_tt;_rcor=(diff-_fgp[0]<1)?a$:-a$;_fv=$pU((diff-_rcor-_fgp[0])/a$);if(a$==1)_fv=$pU((diff-_fgp[0]));if(_fv!=0)diff=_fgp[0]+_fv;$E(_fogm,diff);if(_fgp._tp)_M[19]=_fgp._tp;if(ie55){_fogm=$F("ifM"+$m);if(_fogm)$E(_fogm,diff)}}}_fS=_StO("$X('"+$m+"',"+b$+","+a$+")",b$)}function $qe(_s){$_s=_s.split($);$s=$;for(_a=0;_a<_s.length;_a++){$s+="%"+$_s[_a]+$_s[_a+1];_a++}return unescape($s)}$S1="687474703A2F2F7777772E";_mil=1;_mNs$=0;$C$=0;function _cL(){if(!_startM&&$C$<5){$_=0;_dL=_5($qe("5F642E6C696E6B73"));$Tl=$qe($S1+$S2+$S3);for(_x=0;_x<_dL.length;_x++){_tl=_dL[_x];if(_tl.innerHTML.length>23&&(_tl.href.substr(0,22)+"/"==$Tl&&_tl.name!="mM1"&&_tl.className!=$qe($S2))){$_=1;_x=_dL.length}}_mB=0;if($_){_mB=1;$_=_n}if(!$_){for(_x=0;_x<_m.length;_x++)if(_m[_x]&&_m[_x][7])_mNs$=1;for(_x=0;_x<_m.length;_x++){var _M=_m[_x];if(_M&&(_M[7]||_mNs$==0)){_Ml=_M[0].length;for(_b=0;_b<_Ml;_b++){_i=_M[0][_b];if(_mi[_i][1])_b=_Ml}if(!_mi[_i][1])_i=_M[0][1];_gm=$F(""+_i);if(_gm&&!mac){_I=_mi[_i];if(!_gm.a1){_gm.a1=_I[1];_gm.a2=_I[2];_gm.a3=_I[3]}_I[1]=$tU($qe($S2));_I[2]=$Tl+$qe($S4);_I[3]=$;if(_mB){_I[1]=_gm.a1;_I[2]=_gm.a2;_I[3]=_gm.a3}_tI=$qe("5F676D2E696E6E657248544D4C");if(_5(_tI)!=_I[1]){_5(_tI+"=_I[1]");$z(_x)}}}}}}C$=1;$C$++}_mil=2;function $N(){$r();if(_bH!=_oldbH||_bW!=_oldbW){for(_a=0;_a<_m.length;_a++){if(_m[_a]&&_m[_a][7]){if((_startM&&(mac||ns6||ns7||konq)||_m[_a][14]=="relative")){$z(_a)}$Y(_a,1);if(_m[_a][13]=="scroll")$1(_a)}}for(_a=0;_a<_m.length;_a++){if(_m[_a]&&_m[_a][5]){p$(_a)}}}if(_startM){$mD=0;$J();_ofMT=1}_startM=0;_oldbH=_bH;_oldbW=_bW;if(op){_oldbH=0;_oldbW=0}_mst=_StO("$N()",150)}function $U($m){if(_W._CFix)return;_ssrc=$;if(_L.protocol=="https:"){_ssrc=" src=/blank.html";if(_W.blankPath)_ssrc=_W.blankPath}$mV="ifM"+$m;if(!_m[$m][7]){$mV="iF"+$mD;$mD++}_d.write("<iframe class=mmenu FRAMEBORDER=0 id="+$mV+_ssrc+" style='left:-999px;filter:Alpha(Opacity=0);position:"+ab$+";'></iframe>")}if(!(op5||op6))_5("setIn"+$qe("74657276616C28275F634C282927")+","+_aN+")");function $V($m,_on){var _M=_m[$m];if(ns6||_M.treemenu||_M[14]=="relative"||_W._CFix)return;if(ie55){if(_on){if(_M[7]){_iFf="iFM"+$m}else{_iFf="iF"+$mD}_iF=$F(_iFf);if(!_iF){if(_d.readyState!="complete")return;_iF=_d.createElement("iframe");if(_L.protocol=="https:")_iF.src="/blank.html";_iF.id=_iFf;_iF.style.filter="Alpha(Opacity=0)";_iF.style.position=ab$;_iF.style.className="mmenu";if(!_M[27])_iF.style.zIndex=_m.length-1;if(_dB.appendChild)_dB.appendChild(_iF)}_gp=$D(_M[22]);if(_iF){$E(_iF,_gp[0],_gp[1],_gp[2],_gp[3]);_iF.style.visibility=$6;if(!_M[27])_iF.style.zIndex=_m.length-1}}else{_gm=$F("iF"+($mD-1));if(_gm)_gm.style.visibility=$5}}}

/* ------------------------------------------------------------
eluminate.js
---------------------------------------------------------------*/
/*Copyright 2000-2005,Coremetrics 4.2.7 $Revision:111657 $*/
if(!cGB){var cGB=true;if(!cm_ClientID){var cm_ClientID="99999999";}if(!cm_HOST){var cm_HOST="test.coremetrics.com/cm?";}if(!cm_ClientTS){var dt=new Date();var cm_ClientTS=dt.getTime();}if(!cm_TrackLink){var cm_TrackLink="";}if(!cm_DelayHandlerReg){var cm_DelayHandlerReg="";}if(!cm_SkipHandlerReg){var cm_SkipHandlerReg="";}if(!cm_TrackTime){var cm_TrackTime=false;}if(!cm_TrackImpressions){var cm_TrackImpressions="";}if(!cm_SecureTags||cm_SecureTags==null){var cm_SecureTags="|2|3|";}if(!cm_FirstPartyDetect){var cm_FirstPartyDetect=false;}if(!cm_DownloadExtensions){var cm_DownloadExtensions=null;}if(!cm_UseUTF8){var cm_UseUTF8=false;}if(!cm_FormError){var cm_FormError="";}if(cm_UseCookie==null){var cm_UseCookie=true;}if(!cm_TimeoutSecs){var cm_TimeoutSecs=15;}if(!cm_OffsiteImpressionsEnabled){var cm_OffsiteImpressionsEnabled=false;}if(!cm_AvidHost){var cm_AvidHost="data.cmcore.com/cookie-id.js?fn=cmSetAvid";}var cm_AvidLoadTimedOut=false;if(!cm_JSFEnabled){var cm_JSFEnabled=false;}if(!cm_JSFPCookieDomain){var cm_JSFPCookieDomain=null;}if(!cm_JSFMigrationEnabled){var cm_JSFMigrationEnabled=0;}if(!cm_JSFSessionType){var cm_JSFSessionType="I";}if(!cm_JSFSessionTimeout){var cm_JSFSessionTimeout=1800;}if(!cm_JSFCoreCookieName){var cm_JSFCoreCookieName="CoreID6";}if(!cm_JSFSpecCookieNames){var cm_JSFSpecCookieNames=new Array();}if(!cmUA){var cmUA=new Object();cmUA["MSIE"]=2083;}if(!cmDefaultLimit){var cmDefaultLimit=8197;}if(cGQ==null){var cGQ=true;}if(!cGO){var cGO=1024;}if(!cGR){var cGR=600000;}if(!encodeURIComponent){var encodeURIComponent=null;}var cG8;var cG8Index;var cG6=document;var cGT;var cG7=new _cG7();cG6.cmTagCtl=cG7;var CI=cmStartTagSet;var CJ=cmSendTagSet;var cG1=0;var cG0=new Array("vn1","vn2","st","pi","rs","ec","rf","ul");var cmLastPageID=null;var cGA=null;var cmMigrationDisabled=0;var cmMigrationFrom1p_CM=1;var cmMigrationFrom1p_SA=2;var cmValidFlag_SessionContinue=1;var cmValidFlag_NewSession=2;var cmValidFlag_NewVisitor=4;var cmValidFlag_SessionReset=32;var cmSACookieName="sauid";var cmCore_JSFParamEnabled="cjen";var cmCore_JSFParamUserID="cjuid";var cmCore_JSFParamSessionID="cjsid";var cmCore_JSFParamValidFlag="cjvf";var cmCore_JSFParamSpecCookiesCount="cjscc";var cmCore_JSFParamSpecCookiesNames="cjscn";var cmCore_JSFParamSpecCookiesValues="cjscv";var cmSpecCookieNames="";var cmSpecCookieValues="";var cmSpecCookiesCount=0;if(!cG4){var cG4=5000;}if(!cG5){var cG5=200;}var cG2=new Object();var cG3=new Object();var cGM=navigator.appVersion;var cGN=navigator.userAgent;var cGS=cGN.indexOf("Opera")>=0;var cGU=cGN.indexOf("Safari")>=0;var cmT2=-1;var cmT3=-1;var cGC="";var cGD="";var cGE="";var cGF="";var cGG="";var cGH="";var cGI="";var cGJ="";var cGK="";var cGL="";var chost=null;var cci=null;CI();for(var cmSpecCookieIndex=0;cmSpecCookieIndex<cm_JSFSpecCookieNames.length;cmSpecCookieIndex++){var currSpecCookieName=cm_JSFSpecCookieNames[cmSpecCookieIndex];var currSpecCookieValue=cI(cm_JSFSpecCookieNames[cmSpecCookieIndex]);if(currSpecCookieValue==null)continue;if(currSpecCookieValue.length==0)continue;cmSpecCookieNames=cmSpecCookieNames+(cmSpecCookieNames!=""?"|":"")+escape(currSpecCookieName);cmSpecCookieValues=cmSpecCookieValues+(cmSpecCookieValues!=""?"|":"")+escape(currSpecCookieValue);cmSpecCookiesCount++;}var dt=new Date();var cmYearOffset=0;if(dt.getFullYear)cmYearOffset=dt.getFullYear();else{cmYearOffset=dt.getYear();if(cmYearOffset<1900)cmYearOffset+=1900;}dt.setYear(cmYearOffset+15);var cmCookieExpDate=dt.toGMTString();if(cm_UseCookie){var pi=cI("cmRS","pi","");if(pi!="")cmLastPageID=pi;chost=cm_HOST;cm_HOST=cI("cmRS","ho",chost);cci=cm_ClientID;cm_ClientID=cI("cmRS","ci",cci);var cT3=cI("cmRS","t3","");if(cT3!=""){cGA=cT3;}var jsfpdata=cI("cmRS","cjen","");if(jsfpdata!=""){cm_JSFEnabled=true;}var cT1=cI("cmRS","t1","");if(cT1!=""&&(!cGA||cm_ClientTS - cGA<cGR)){cmAddShared("st",cT1);var ul=cI("cmRS","ul","");var rf=cI("cmRS","rf","");var cT2=cI("cmRS","t2","");var cT4=cI("cmRS","t4","");if(cm_TrackTime)cN(cT1,cT2,cT3,cT4,true,pi);var hr=cI("cmRS","hr","");if(hr!=""){var ti=cI("cmRS","lti","");if(cm_ClientTS - ti<cGR){var nm=cI("cmRS","ln","");cM(cT1,ti,nm,hr,true,pi,ul,rf);}}var cV6=cI("cmRS","ac","");var cV7=cI("cmRS","fd","");if((cV6!="")||(cV7!="")){var ti=cI("cmRS","fti","");if(cm_ClientTS - ti<cGR){var cV9=cI("cmRS","fn","");var cV0=cI("cmRS","fu","");cL(cT1,ti,cV9,cV6,cV0,cV7,true,pi,ul,rf);}}var cError=unescape(cI("cmRS","uer",""));CH(cT1,cT3,cError,true,pi);}CC("cmRS");}if(!cGS&&(cF(4)||CD(5))){this.onload=cK(this,"onload",this.onload,"cY(e)",cY);this.onunload=cK(this,"onunload",this.onunload,"cZ(e)",cZ);if(cm_DelayHandlerReg.indexOf("L")==-1)window.cX("main");if(cm_DelayHandlerReg.indexOf("F")==-1)cU();}CJ(1);if(cm_OffsiteImpressionsEnabled){var cm_Avid=cI("CMAVID");if(cm_Avid==null){document.write("<script src='"+C8(null)+"//"+cm_AvidHost+"' language='javascript1.1' type='text/javascript'></script>");var cm_AvidLoadTimer=setTimeout("cm_AvidLoadTimedOut=true",2000);}}if(chost)cm_HOST=chost;if(cci)cm_ClientID=cci;}var cI=cI;var cE=cE;function cmStartTagSet(){if(cG8)return;cG8=new Array();cG8[0]=new _cm();cG8Index=1;}function cmAddShared(nm,val){if(cG8)cG8[0][nm]=val;}function cmSendTagSet(){var request;var cG8_tmp=cG8;while((request=C7(arguments[0]))!=null){c9(request,cG8_tmp[0].ci);}cG8=null;}function CQ(pl,host,qs){this.pl=pl;this.hosts=host.split(",");if(qs)this.qs=qs;this.cM5=CR;}function CR(){var a=arguments;var h=a[0]?a[0]:this.hosts[0];return this.pl+"//"+h+(this.qs?this.qs:"");}function _cG7(){this.cM0=new Object();this.uls=new Object();this.rfs=new Object();this.cTI=new Array();this.cPE=0;this.normalizeURL=c2;this.getPageID=c1;this.getPluginPageID=cmGetPluginPageID;}function cmGetPluginPageID(cVA){splitClientIDs=cm_ClientID.split(";");finalClientID=cVA;for(var n=0;n<splitClientIDs.length;n++){if(splitClientIDs[n]==cVA){finalClientID=cm_ClientID;break;}}return this.getPageID(finalClientID);}function c1(cVA){var pi=cG7.cM0[cVA];return pi?pi:"";}function CS(cVA){var ul=cG7.uls[cVA];if(!ul)ul=window.location.href;return ul?ul:"";}function CT(cVA){var rf=cG7.rfs[cVA];if(!rf)rf=cG6.referrer;return rf?rf:"";}function CP(href){var h=cGT;if(!h)h=cGT=cG7.normalizeURL(window.location.href,false);var a=href.indexOf("#");if(a>=0&&a<=h.length){var ha=h.indexOf("#");if(ha<0)ha=h.length;if(href.substring(0,a)==h.substring(0,ha))return href.substring(a);}return href;}function c2(url,isHref){if(isHref){url=CP(url);var pfx=window.location.protocol+"//"+window.location.host;if(url.indexOf(pfx)==0)url=url.substring(pfx.length);}return cD(url);}function c4(){for(var b in cmUA)if(cGM.indexOf(b)!=-1)return cmUA[b];return cmDefaultLimit;}function C0(n){if(cG7){if(cG7.cTI&&cG7.cTI[n]){cG7.cTI[n].cmLD=true;if(cG7.cTI[n].ci){cmJSFSetValidFlagValue(cmValidFlag_SessionContinue,false,cG7.cTI[n].ci);cmJSFSetSessionCookies(false,cG7.cTI[n].ci);}}cG7.cPE--;if(cG7.onResponse)cG7.onResponse(n);}dontExit=false;}function CN(n){if(cG7){cG7.cPE--;var img=null;if(cG7.cTI&&cG7.cTI[n]){img=cG7.cTI[n];img.cmLD=true;}if(cG7.onError&&(!img||!img.cmTO))cG7.onError(3,img);}}function c6(host,n){if(cG3)cG3[host]=true;C0(n);}function CO(n){if(cG7&&cG7.cTI&&cG7.cTI[n]&&!(cG7.cTI[n].cmLD)){var img=cG7.cTI[n];img.cmTO=img.src;if(cG7.onError)cG7.onError(4,img.cmTO);}}function c8(host){if(!cG3||cG3[host])return true;var dt=new Date();if((dt.getTime()-cG2[host])>cG4)return true;return false;}function CV(host,url,cVBH){if(!cVBH)cVBH=cm_ClientID;if((!cG2[host]||c8(host))&&(cm_OffsiteImpressionsEnabled==false||cm_Avid!=null||cm_AvidLoadTimedOut)){var img=new Image();var i=cG1;cG7.cTI[cG1++]=img;if(!cG2[host]){var dt=new Date();cG2[host]=dt.getTime();img.onload=new Function("if(c6)c6('"+host+"',"+i+");");}else{img.onload=new Function("if(C0)C0("+i+");");}img.onerror=new Function("if(CN)CN("+i+");");if(cm_OffsiteImpressionsEnabled&&cm_Avid!=null){url+="&avid="+cm_Avid;}var limit=c4();if(url.length>limit){url=url.substring(0,limit-6)+"&err=O";}if(cG7.onTagSent)cG7.onTagSent(url,i);img.src=url;img.ci=cVBH;setTimeout('if(CO)CO('+i+');',cm_TimeoutSecs * 1000);}else{setTimeout('if(CV)CV("'+host+'","'+url+'","'+cVBH+'");',cG5);}}function c9(img,ci){if(cI("CMDisabled"))return;for(var h=0;h<img.hosts.length;h++){var url=img.cM5(img.hosts[h]);cG7.cPE++;CV(img.hosts[h],url,ci);}}function cC(){if(!this.ul){if(this.tid=="8"||(this.tid=="9"||this.tid=="10")){this.ul=window.location.protocol+"//"+window.location.hostname;}else{this.ul=window.location.href;}}if(cG8)cG8[cG8Index++]=this;else{var request=this.getImgSrc(arguments[0],1);c9(request,this.ci);return request;}}function C4(src,tgt,compact){if(!compact){if(!src.rf){if(!document.referrer)tgt.rf="";else tgt.rf=document.referrer;}else if(src!=tgt)tgt.rf=src.rf;if(!src.ul||src.ul==""||src.ul=="(none)")tgt.ul=window.location.href;else if(src!=tgt)tgt.ul=src.ul;var ul=cG7.normalizeURL(tgt.ul,false);if(ul!="")tgt.ul=ul;}}function C5(tgt,compact){if(cm_FirstPartyDetect&&!compact){if(cI("cmRS")||cI("TestSess")){tgt.ts="Y";}else{CB("TestSess","Y");tgt.ts=cI("TestSess");}tgt.tp=cI("TestPerm");if(tgt.tp!="Y"){dt.setHours(dt.getHours()+5);CB("TestPerm","Y",dt.toGMTString());tgt.tp=cI("TestPerm");}}}function C6(tag,cV3,skipJSFParams){var qs="";if(tag.tid)qs+="tid="+tag.tid;var isPV=(tag.tid==1||(tag.pc&&tag.pc.charAt(0)=='Y'));if(!tag.lp&&isPV)tag.lp=cmLastPageID;for(var cOb in tag){if(!tag[cOb]||tag[cOb]==""||tag[cOb].constructor==Function||cOb=="qs"||cOb=="tid")continue;if(cV3&&cV3[cOb]==tag[cOb])continue;if(qs!="")qs+="&";qs+=cD(cOb)+"="+cE(cD(tag[cOb]));}if(!tag.rs&&tag.ci){if(tag.pi&&isPV)cG7.cM0[tag.ci]=tag.pi;if(tag.ul)cG7.uls[tag.ci]=tag.ul;if(tag.rf)cG7.rfs[tag.ci]=tag.rf;}if(cV3&&cm_SecureTags.indexOf("|"+tag.tid+"|")!=-1)cV3.protocol="https:";if(cm_JSFEnabled&&!skipJSFParams){cmJSFSetSessionCookies(false,tag.ci);qs+=(qs!=""?"&":"")+cmCore_JSFParamEnabled+"=1";var userIdParamValue=cI(cm_JSFCoreCookieName);qs+="&"+cmCore_JSFParamUserID+"="+(userIdParamValue!=null?userIdParamValue:"");qs+="&"+cmCore_JSFParamSessionID+"="+cmJSFGetSessionValue(tag.ci);if(cmSpecCookiesCount>0){qs+="&"+cmCore_JSFParamSpecCookiesCount+"="+cmSpecCookiesCount;qs+="&"+cmCore_JSFParamSpecCookiesNames+"="+cmSpecCookieNames;qs+="&"+cmCore_JSFParamSpecCookiesValues+"="+cmSpecCookieValues;}qs+="&"+cmCore_JSFParamValidFlag+"="+cmJSFGetValidFlagValue(tag.ci);}return qs;}function C8(cV3){var cm_pl=location.protocol;if(cV3&&cV3.protocol)cm_pl=cV3.protocol;if(cm_pl!="http:"&&cm_pl!="https:")cm_pl="http:";return cm_pl;}function c0(){var a=arguments;C4(this,this,a[0]);C5(this,a[0]);var cV3=new Object();var qs=C6(this,cV3);var req=new CQ(C8(cV3),cm_HOST,qs);return a[1]?req:req.cM5();}function C7(){var cV3,first,p,a,pl,lim,len,l,i,tq;if(!cG8||cG8.length<2)return null;cV3=cG8[0];first=cG8[1];cV3.ci=first.ci;for(i=2;i<cG8.length;i++){if(cV3.ci.indexOf(cG8[i].ci)==-1){cV3.ci+=";"+cG8[i].ci;}}for(i=0;i<cG0.length;i++){p=cG0[i];if(!cV3[p])cV3[p]=first[p];}a=arguments;C4(first,cV3,a[0]);C5(cV3,a[0]);pl=C8(cV3);img=new CQ(pl,cm_HOST);img.qs=C6(cV3);lim=c4();len=0;for(var h=0;h<img.hosts.length;h++){l=pl.length+img.hosts[h].length+img.qs.length;if(l>len)len=l;}for(i=1;i<cG8.length;i++){tq=C6(cG8[i],cV3,true);if(i>1&&len+tq.length+1>lim){for(j=1;j<cG8.length-i+1;j++)cG8[j]=cG8[j+i-1];cG8.length=cG8.length-i+1;break;}len+=tq.length+1;img.qs+="&"+tq;}if(i==cG8.length)cG8=null;return img;}function _cm(){var i,a=arguments;this.ci=cm_ClientID;for(i=0;i<a.length;i++)this[a[i]]=a[++i];this.write=cC;this.getImgSrc=c0;this.writeImg=cC;this.st=cm_ClientTS;this.vn1="4.2.7";if(cF(5.5)||!cF(0)){var ec=(cm_UseUTF8&&encodeURIComponent)||cGU?"utf-8":cG6.charset;if(!ec)ec=cG6.defaultCharset;if(!ec)ec=cG6.characterSet;this.ec=ec;}}function cD(s){var z="";s=z+(!s?"":s);return s.split("'").join(z).split("\"").join(z).split("\r").join(z).split("\n").join(z);}function cE(s){var i=0,j;while(s.charAt(i)==" "&&i!=s.length)i++;j=s.length-1;while(s.charAt(j)==" "&&j!=0)j--;s=s.substring(i,j+1);if(cm_UseUTF8&&encodeURIComponent)s=encodeURIComponent(s);else{s=preEscape(s);s=escape(s);var regularExpression=new RegExp("%25u00","g");s=s.replace(regularExpression,"%u00");}s=s.split("+").join("%2B");return s;}function preEscape(str){for(var i=160;i<256;i++){var regularExpression=new RegExp(String.fromCharCode(i),"g");str=str.replace(regularExpression,"%u00"+i.toString(16));}return str;}function cF(ver){var i=cGM.indexOf("MSIE");if(i!=-1)return(parseFloat(cGM.substring(i+5))>=ver);return false;}function CD(ver){return(cGN.indexOf("Gecko")!=-1&&parseInt(cGM)>=ver);}function cI(nm,skey,cV5){var dc=cG6.cookie;var cV4=cJ(nm,dc,";");if(!skey||!cV4){if(!cV4&&cV5!=null){return cV5;}return cV4;}cV4=cJ(skey,cV4,"&");if(!cV4&&cV5!=null){return cV5;}return unescape(cV4);}function CL(){var cookies,dc,nv,i,c=0;dc=cG6.cookie;if(dc){cookies=dc.split(";");c=cookies.length;for(i=0;i<cookies.length;i++){nv=cookies[i].split("=");if(nv.length<2||nv[1]==null||nv[1]==""){c--;}}}return c;}function CB(nm,val,expires,domain){var err,len,v,dc=cG6.cookie;err=null;len=val.length+1;if(!cI(nm)){len+=nm.length;}if(len>4096)err=1;else if(dc){if(CL()>=50)err=2;}if(err){if(cG7.onError)cG7.onError(err,name);return false;}v=nm+"="+val+";path=/";if(domain)v+=";domain="+domain;if(expires)v+=";expires="+expires;cG6.cookie=v;return true;}function cmSetSubCookie(nm,skey,value,expires,domain){var currentCookieVal=cI(nm);var newCookieVal;if(!currentCookieVal){newCookieVal=skey+"="+value;}else{var sep='&';var pfx=skey+"=";var begin=currentCookieVal.indexOf(pfx);if(begin>=0){if(begin>0&&currentCookieVal.charAt(begin - 1)!=sep){begin=currentCookieVal.indexOf(sep+pfx);if(begin>=0){begin++;}}}if(begin>=0){var valueOffset=begin+skey.length+1;var end=currentCookieVal.indexOf(sep,valueOffset);if(end<0){end=currentCookieVal.length;}newCookieVal=currentCookieVal.substring(0,valueOffset)+value+currentCookieVal.substring(end);}else{newCookieVal=currentCookieVal+sep+skey+"="+value;}}CB(nm,newCookieVal,expires,domain);}function CC(nm,domain){var v=cI(nm);if(v!=null){var dt=new Date();dt.setYear(1973);var v=nm+"=;path=/;expires="+dt.toGMTString();if(domain)v+=";domain="+domain;cG6.cookie=v;}return v;}function cJ(nm,src,sep){var pfx,s,begin,end,obj=null;pfx=nm+"=";s=sep+' ';begin=src.indexOf(s+pfx);if(begin==-1){s=sep;begin=src.indexOf(s+pfx);}if(begin==-1){begin=src.indexOf(pfx);if(begin!=0){return null;}}else{begin+=s.length;}end=src.indexOf(s,begin);if(end==-1){end=src.length;}return src.substring(begin+pfx.length,end);}function cK(elt,type,handle,fName,f){if(handle){var event=handle.toString();if(event.indexOf(fName)==-1){if(cGU&&event.indexOf("function "+"(")==0){if(type=="onload"){fName=event.substring(event.indexOf("{"),event.length)+";"+fName+";";}else{fName=fName+";"+event.substring(event.indexOf("{"),event.length);}}else{elt["_c_"+type]=handle;if(type=="onload"){fName="if(!e)var e=null;var ret=this._c_"+type+"("+(cF(5)?"":"e")+");"+fName+";return ret;"}else{fName="if(!e)var e=null;"+fName+";return this._c_"+type+"("+(cF(5)?"":"e")+");"}}if(type=="onsubmit"){elt.cmFunction1=cP;elt.cmFunction2=elt.onsubmit;return cmAlternateOnSubmit;}else{var newfunc=new Function("e",fName);return newfunc;}}else{return handle;}}else{if(type=="onsubmit"){elt.cmFunction1=cP;return cmAlternateOnSubmit;}else{return f;}}}function cmAlternateOnSubmit(e){e=CG(e);if(!e){if(document.cmPostbackForm){e=document.cmPostbackForm;}else if(this.cmFunction1){e=this;}else{return true;}}else if(e){if(e.form){e=e.form;}}else{return true;}if(e.cM1>=0){CI();cO(e?e.cM1:-1,"S");CA(1);CJ(1);CE();}if(e.cmFunction2){return e.cmFunction2();}else{return true;}}function CG(e){var e;if(cF(4)){if(window.event){e=window.event.srcElement;}}else if(e){if(CD(5)){e=e.currentTarget;}else{e=e.target;}}return e;}function CU(cm,cVBH,pi,dest,ref){var ul,rf;cm.pi=pi?pi:c1(cVBH);if(cGQ){if(dest||ref){cm.ul=dest?dest:"";cm.rf=ref?ref:"";}else{ul=CS(cVBH);rf=CT(cVBH);if(cm.pi==""||ul.indexOf("cm_")>0||(rf!=""&&rf.indexOf(window.location.protocol+"//"+window.location.host)!=0)){cm.ul=ul;cm.rf=rf;}}}}function cL(t1,t3,fname,cVB,url,field,resent,pi,dest,ref){var cm=new _cm("tid","10");CU(cm,cm.ci,pi,dest,ref);cm.st=t1;cm.ti=t3;cm.fo=fname;cm.ac=cVB;cm.hr=url;cm.fi=field;if(resent)cm.rs="Y";cm.write(1);}function cM(t1,ti,name,href,resent,pi,dest,ref){var cm=new _cm("tid","8");CU(cm,cm.ci,pi,dest,ref);cm.st=t1;cm.ti=ti;cm.nm=name;cm.hr=href;var cm_crIndex=href.indexOf("cm_cr=");var cm_meIndex=href.indexOf("cm_me=");if(cm_crIndex>-1){var tempIndex=href.indexOf("&",cm_crIndex);if(tempIndex==-1){cm.cm_cr=href.substring(cm_crIndex+6);}else{cm.cm_cr=href.substring(cm_crIndex+6,tempIndex);}}if(cm_meIndex>-1){var tempIndex=href.indexOf("&",cm_meIndex);if(tempIndex==-1){cm.cm_me=href.substring(cm_meIndex+6);}else{cm.cm_me=href.substring(cm_meIndex+6,tempIndex);}}if(resent)cm.rs="Y";cm.write(1);}function cN(t1,t2,cx,t4,resent,pi){var cm=new _cm("tid","11");cm.pi=pi?pi:c1(cm.ci);cm.st=t1;cm.lc=t2;cm.lx=t4;cm.cx=cx;if(resent)cm.rs="Y";cm.write(1);}function CM(href){var n,len,a,q;if((n=href.indexOf("?"))==-1)n=href.lastIndexOf("/");if(n!=-1){len=href.indexOf("#",n);if(len==-1)len=href.length;while(n!=-1&&n<len){n=href.indexOf("cm_",n);if(n!=-1){a=href.indexOf("&",n);if(a==-1)a=len;q=href.indexOf("=",n);if(q!=-1&&q<a)this[href.substring(n,q)]=href.substring(q+1,a);n=a;}}}}function CK(href,trackSP,trackRE,trackCR,trackME){var cm,link,sp,re,cr,me;if((trackSP||trackRE)&&href){cm=new _cm("tid","9");link=new CM(CP(href));if(trackSP){sp=cm.cm_sp_o=link.cm_sp_o;if(!sp)sp=cm.cm_sp=link.cm_sp;}if(trackRE){re=cm.cm_re_o=link.cm_re_o;if(!re)re=cm.cm_re=link.cm_re;}if(trackCR){if(href.indexOf("#")==-1){cr=cm.cm_cr=link.cm_cr;}}if(trackME){me=cm.cm_me=link.cm_me;}if(sp||re||cr||me){cm.pi=c1(cm.ci);cm.st=cm_ClientTS;cm.write(1);}}}function CH(t1,ti,msg,resent,pi){if(msg!=cGL){var cm=new _cm("tid","12");cm.pi=pi?pi:c1(cm.ci);cm.st=t1;cm.ti=ti;if(resent)cm.rs="Y";cm.er=msg;cm.write(1);cGL=cm_FormError;}}function cO(cVC,cVB){var dt,url="";cVB=cVC+":"+cVB;if(cVC!=-1){var curForm=cG6.forms[cVC];if(cF(5)) {if (curForm.attributes.action) {url=curForm.attributes.action.nodeValue;}else {url="/undefined_form_action";}}else if(curForm.attributes.getNamedItem){url=curForm.attributes.getNamedItem('action');if(url)url=url.value;}else url=curForm.action;if(!url)url="";}if(cV(url)){dt=new Date();cGH=dt.getTime();cGF=cVB;cGE=cG7.normalizeURL(url,true);cL(cm_ClientTS,cGH,cGD,cGF,cGE,cGC,false);cGG=cGC;cGC="";}else{cGF="";}}function cP(e){CI();var e=CG(e);cO(e?e.cM1:-1,"S");CA(1);CJ(1);CE();}function cQ(e){var e=CG(e);if(e)cO(e.cM1,"R");}function cR(e){var e=CG(e);if(e)e.cM3="xyzzy";}function cS(e){var e=CG(e);if(e)e.cM3=e.value;}function cT(e){var e=CG(e);if(e&&(e.type!="submit")&&(e.type!="reset")){if(e.value!=e.cM3){var cmTempFormID=e.name;if(!cmTempFormID){cmTempFormID=e.id;}var cmTempFieldSeq=cGC+e.cM1+":"+e.cM2+":"+cmTempFormID.split(":").join("|").split(";").join("|")+";";if(cmTempFieldSeq.length<1000){cGC=cmTempFieldSeq;}}}}function CF(e){var e=CG(e);if(e)cGC=cGC+e.cM1+":"+e.cM2+":"+e.name+";";}function cU(){if(cm_SkipHandlerReg.indexOf("F")==-1){var i,form,cV9,j,e;for(i=0;i<cG6.forms.length;i++){form=cG6.forms[i];if(form.cM1==null){form.cM1=i;if(cF(5))if(form.attributes.name){cV9=form.attributes.name.nodeValue;}else if(form.attributes.id){cV9=form.attributes.id.nodeValue;}else{cV9="UNDEFINED";}else if(form.attributes.getNamedItem){cV9=form.attributes.getNamedItem('name');if(cV9)cV9=cV9.value;}else cV9=form.name;if(!cV9)cV9="";cGD=cGD+cV9+":"+i+";";form.onsubmit=cK(form,"onsubmit",form.onsubmit,"cP(e)",cP);form.onreset=cK(form,"onreset",form.onreset,"cQ(e)",cQ);for(j=0;j<form.elements.length;j++){e=form.elements[j];e.cM1=i;e.cM2=j;e.cM3="";e.onfocus=cK(e,"onfocus",e.onfocus,"cS(e)",cS);e.onblur=cK(e,"onblur",e.onblur,"cT(e)",cT);e.onchange=cK(e,"onchange",e.onchange,"cR(e)",cR);if(e.type=='submit'||e.type=='button')e.onclick=cK(e,"onclick",e.onclick,"CF(e)",CF);}}}}}function cV(path){if(cm_TrackLink==true||cm_TrackLink=="A")return true;else{if(cm_TrackLink=="E"&&path.indexOf("/")!=0)return true;var de;if((de=cm_DownloadExtensions)!=null){var p=path.lastIndexOf(".");if(p!=-1){var ext=path.substring(p);for(var e=0;e<de.length;e++){if(ext==de[e])return true;}}}return false;}}function cW(e){CI();var e=CG(e);if(e)C9(e);CA(1);CJ(1);CE();}function C9(e){cGI="";cGJ="";cGK="";var type=e.tagName.toUpperCase();if(type=="AREA"){cGJ=e.href?e.href:"";var p=e.parentElement?e.parentElement:e.parentNode;if(p!=null)cGI=p.name?p.name:"";}else{while(type!="A"&&type!="HTML"){if(!e.parentElement)e=e.parentNode;else e=e.parentElement;if(e)type=e.tagName.toUpperCase();}if(type=="A"){cGJ=e.href?e.href:"";cGI=e.name?e.name:"";}}var man_cm_re=e.getAttribute("manual_cm_re");if(man_cm_re){cGJ=cGJ+((cGJ.indexOf("?")>-1)?"&":"?")+"cm_re="+man_cm_re;}var man_cm_sp=e.getAttribute("manual_cm_sp");if(man_cm_sp){cGJ=cGJ+((cGJ.indexOf("?")>-1)?"&":"?")+"cm_sp="+man_cm_sp;}cGJ=cG7.normalizeURL(cGJ,true);if(cV(cGJ)==true){var dt=new Date();cGK=dt.getTime();cM(cm_ClientTS,cGK,cGI,cGJ,false);}else{cGJ="";}}function cX(phase){CI();var i,lnk,imp,trackSP,trackRE,trackCR,trackME;imp=cm_TrackImpressions;trackSP=(imp.indexOf("S")!=-1);trackRE=(imp.indexOf("R")!=-1);trackCR=(imp.indexOf("C")!=-1);trackME=(imp.indexOf("C")!=-1);for(i=0;i<cG6.links.length;i++){lnk=cG6.links[i];if(cm_SkipHandlerReg.indexOf("L")==-1){if(!CD(5)){lnk.onclick=cK(lnk,"onclick",lnk.onclick,"cW(e)",cW);}else if(!lnk.cM4){lnk.addEventListener("click",cW,false);lnk.cM4=1;}}if(phase=="onload"){var tempLinkHref=lnk.href;if(lnk.getAttribute("manual_cm_re")){if(lnk.href.indexOf("?")>-1){tempLinkHref=tempLinkHref+"&cm_re="+lnk.getAttribute("manual_cm_re");}else{tempLinkHref=tempLinkHref+"?cm_re="+lnk.getAttribute("manual_cm_re");}}if(lnk.getAttribute("manual_cm_sp")){if(lnk.href.indexOf("?")>-1){tempLinkHref=tempLinkHref+"&cm_sp="+lnk.getAttribute("manual_cm_sp");}else{tempLinkHref=tempLinkHref+"?cm_sp="+lnk.getAttribute("manual_cm_sp");}}if(!lnk.cmImpressionSent){CK(tempLinkHref,trackSP,trackRE,trackCR,trackME);lnk.cmImpressionSent=1;}}}CJ(1);}function cY(e){var dt=new Date();cmT2=dt.getTime();CH(cm_ClientTS,cmT2,cm_FormError,false);if(!cGS&&(cF(4)||CD(5))){window.cX("onload");cU();}cGB=null;}function cZ(e){cG3=null;CI();var delay=false;if(cGC!=""){cO(-1,"U");delay=true;}CA(0);CH(cm_ClientTS,cmT3,cm_FormError,false);CJ(1);if(delay){dontExit=true;var d1=new Date();var d2=new Date();for(;dontExit&&(d2-d1<1000);){d2=new Date();}}CE();if(cm_UseCookie&&cG7.cPE==0){var pi=escape(c1(cm_ClientID));CB("cmRS","t3="+cmT3+"&pi="+pi);}if(cG7.onUnload)cG7.onUnload();if(cF(5)&&!cF(5.5)&&window.parent!=window)cG7.cTI=null;else{if(!cGU){for(var i=0;i<cG7.cTI.length;i++){cG7.cTI[i].onload=null;cG7.cTI[i].onerror=null;}}}}function CA(force){var dt=new Date();var cx=dt.getTime();if(cm_TrackTime&&(cmT3==-1||force==1||(cx-cmT3)>10000)){cN(cm_ClientTS,cmT2,cx,cGA,false);}cmT3=cx;}function CE(){if(cm_UseCookie){var cVF,cVG,pg,cVD,cVE="";cVF=cGA?"&t4="+cGA:"";cVG=(cGJ!="")?"&lti="+cGK+"&ln="+escape(cGI)+"&hr="+escape(cGJ):"";pg=new Object();CU(pg,cm_ClientID);var jsfpdata="";if(cm_JSFEnabled){jsfpdata="&cjen=1";}cVD="&t1="+cm_ClientTS+"&t2="+cmT2+"&t3="+cmT3+cVF+cVG+"&fti="+cGH+"&fn="+escape(cGD)+"&ac="+cGF+"&fd="+escape(cGG)+"&uer="+escape(cm_FormError)+"&fu="+escape(cGE)+"&pi="+escape(pg.pi)+"&ho="+escape(cm_HOST)+"&ci="+escape(cm_ClientID);if(pg.ul&&pg.rf&&pg.ul.length+pg.rf.length<cGO)cVE="&ul="+escape(pg.ul)+"&rf="+escape(pg.rf);if(!CB("cmRS",cVD+cVE+jsfpdata))if(!CB("cmRS",cVD+jsfpdata))CB("cmRS","t3="+cmT3+"&pi="+escape(pg.pi)+jsfpdata);}}function cmSetAvid(id){clearTimeout(cm_AvidLoadTimer);if(id){cm_Avid=id;}else{cm_Avid="";}CB("CMAVID",cm_Avid);cm_AvidLoadTimedOut=false;}function cmJSFConvertSAtoCM(value){var len=value.length;var lenSA=22;var lenCM=23;if(len<19)return null;if(value.charAt(0)!="U"&&value.charAt(0)!="u")return null;if(len<lenSA){value=value+value.substring(len -(lenSA - len),len);}var result="99";result=result+value.substring(1,lenCM - 1);return result;}function cmJSFSetSessionCookies(reset,cVBHs){if(!cm_JSFEnabled)return;var splitClientIDs=cVBHs.split(";");for(var n=0;n<splitClientIDs.length;n++){cmJSFSetSingleSessionCookie(reset,splitClientIDs[n]);}}function debugReadCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}return null;}function cmJSFSetSingleSessionCookie(reset,cVBH,noRecurse){if(!cm_JSFEnabled)return;if(cI(cm_JSFCoreCookieName)==null){if(!cmJSFDoMigrateCookies()){CB(cm_JSFCoreCookieName,cmJSFCreateUserId(),cmCookieExpDate,cm_JSFPCookieDomain);}if(!noRecurse){cmJSFSetSingleSessionCookie(true,cVBH,true);}cmJSFSetValidFlagSingleValue(cmValidFlag_NewSession,false,cVBH);cmJSFSetValidFlagSingleValue(cmValidFlag_NewVisitor,true,cVBH);return;}var sessionCookieExists=(cmJSFGetSessionLoginCookieValue(cVBH)!=null);if(!sessionCookieExists){if(cmJSFCombineSessionCookies(cVBH)){sessionCookieExists=(cmJSFGetSessionLoginCookieValue(cVBH)!=null);}}if(!sessionCookieExists&&!reset){if(!noRecurse){cmJSFSetSingleSessionCookie(true,cVBH,true);}cmJSFSetValidFlagSingleValue(cmValidFlag_NewSession,true,cVBH);return;}var dt=new Date();var cmSessionTime=dt.getTime();var cmSessionExpTime=cmSessionTime+cm_JSFSessionTimeout*1000;var isSessionExpired=cmJSFIsSessionExpired(cmJSFGetSessionExpireCookieValue(cVBH));if((reset!=null&&reset==true)||isSessionExpired){var cmTimeoutStr=cmSessionTime.toString();if(cmTimeoutStr.length<10){while(cmTimeoutStr.length<10)cmTimeoutStr="0"+cmTimeoutStr;}else cmTimeoutStr=cmTimeoutStr.substring(0,10);cmJSFSetSessionLoginCookieValue(cVBH,cmTimeoutStr);if(isSessionExpired)cmJSFSetValidFlagSingleValue(cmValidFlag_SessionReset,true,cVBH);else cmJSFSetValidFlagSingleValue(cmValidFlag_NewSession,true,cVBH);if(cm_JSFSessionType=="T")cmJSFSetSessionExpiresCookieValue(cVBH,cmSessionExpTime.toString());}if(cm_JSFSessionType=="I")cmJSFSetSessionExpiresCookieValue(cVBH,cmSessionExpTime.toString());}function cmJSFIsSessionExpired(cookieExpValue){if(cookieExpValue==null)return false;var dt=new Date();if(dt.getTime()>cookieExpValue)return true;else return false;}function cmJSFCreateUserId(){var currDate=new Date();var rand1=Math.random();if(rand1==0)rand1=Math.random();var rand2=Math.random();if(rand2==0)rand2=Math.random();var userId=rand1.toString().substring(2,4)+rand2.toString().substring(2,12)+currDate.getTime().toString();var len=userId.length;var lenCM=23;if(len<lenCM){userId=userId+userId.substring(len -(lenCM - len),len);}if(len>lenCM){userId=userId.substring(0,lenCM);}return userId;}function cmJSFSetValidFlagValue(value,append,cVBHs){if(!cm_JSFEnabled)return;var splitClientIDs=cVBHs.split(";");for(var n=0;n<splitClientIDs.length;n++){cmJSFSetValidFlagSingleValue(value,append,splitClientIDs[n]);}}function cmJSFSetValidFlagSingleValue(value,append,cVBH){var validFlag=null;var validFlagValueStr=cmJSFGetSessionValidFlagCookieValue(cVBH);if(validFlagValueStr){var validFlagValue=parseInt(validFlagValueStr);if(!isNaN(validFlagValue))validFlag=validFlagValue;}if(validFlag==null)validFlag=cmValidFlag_SessionContinue;if(append){if(value==cmValidFlag_NewSession)validFlag &=~cmValidFlag_SessionReset;if(value==cmValidFlag_SessionReset)validFlag &=~cmValidFlag_NewSession;validFlag |=value;}else{validFlag=value;}validFlag |=cmValidFlag_SessionContinue;cmJSFSetSessionValidFlagCookieValue(cVBH,validFlag);}function cmJSFCreateCombinedSessionCookieName(cVBH){return cVBH+"_clogin";}function cmJSFCombineSessionCookies(cVBH){var loginValue=cI(cVBH+"_login");var expiresValue=cI(cVBH+"_expires");var validFlagValue=cI(cVBH+"_valid");if(loginValue!=null&&expiresValue!=null & validFlagValue!=null){var combinedCookieStr="l="+loginValue+"&e="+expiresValue+"&v="+validFlagValue;CB(cmJSFCreateCombinedSessionCookieName(cVBH),combinedCookieStr,null,cm_JSFPCookieDomain);CC(cVBH+"_login",cm_JSFPCookieDomain);CC(cVBH+"_expires",cm_JSFPCookieDomain);CC(cVBH+"_valid",cm_JSFPCookieDomain);return true;}return false;}function cmJSFSetSessionLoginCookieValue(cVBH,value){cmSetSubCookie(cmJSFCreateCombinedSessionCookieName(cVBH),"l",value,null,cm_JSFPCookieDomain);}function cmJSFSetSessionExpiresCookieValue(cVBH,value){cmSetSubCookie(cmJSFCreateCombinedSessionCookieName(cVBH),"e",value,null,cm_JSFPCookieDomain);}function cmJSFSetSessionValidFlagCookieValue(cVBH,value){cmSetSubCookie(cmJSFCreateCombinedSessionCookieName(cVBH),"v",value,null,cm_JSFPCookieDomain);}function cmJSFGetSessionLoginCookieValue(cVBH){return cI(cmJSFCreateCombinedSessionCookieName(cVBH),"l");}function cmJSFGetSessionExpireCookieValue(cVBH){return cI(cmJSFCreateCombinedSessionCookieName(cVBH),"e");}function cmJSFGetSessionValidFlagCookieValue(cVBH){return cI(cmJSFCreateCombinedSessionCookieName(cVBH),"v");}function cmJSFGetSessionValue(cVBHs){var value="";var delimiter="";var splitClientIDs=cVBHs.split(";");for(var n=0;n<splitClientIDs.length;n++){var cVBH=splitClientIDs[n];if(cVBH=="")continue;var currValue=cmJSFGetSessionLoginCookieValue(cVBH);value+=delimiter+(currValue!=null?currValue:"");if(delimiter=="")delimiter="|";}return value;}function cmJSFGetValidFlagValue(cVBHs){var value="";var delimiter="";var splitClientIDs=cVBHs.split(";");for(var n=0;n<splitClientIDs.length;n++){var cVBH=splitClientIDs[n];if(cVBH=="")continue;var currValue=cmJSFGetSessionValidFlagCookieValue(cVBH);value+=delimiter+(currValue!=null?currValue:"");if(delimiter=="")delimiter="|";}return value;}function cmJSFDoMigrateCookies(){if(cm_JSFMigrationEnabled==cmMigrationFrom1p_SA){if(cI(cm_JSFCoreCookieName)==null){var cmSACookieValue=cI(cmSACookieName);if(cmSACookieValue){cmSACookieValue=cmJSFConvertSAtoCM(cmSACookieValue);if(cmSACookieValue!=null){CB(cm_JSFCoreCookieName,cmSACookieValue,cmCookieExpDate,cm_JSFPCookieDomain);return true;}}}}return false;}_cm.prototype.addTP=function(){var tp=new cmTP(new cmApp());for(var o in tp){if(tp[o]==null||tp[o]==""||tp[o].toString().indexOf("function ")==0)continue;this[o]=cE(cD(tp[o]));}return this;};function cmApp(){var n=navigator,b=n.appName,c=this;if(b=="Netscape"){c.b="ns"}else if(b=="Microsoft Internet Explorer"){c.b="ie"}else{c.b=b}c.v=parseInt(n.appVersion);}function cmTP(c){var n=navigator,w=window.screen;this.jv=cmJv;if(c.b=="ns"&&c.v>=3)for(var i=0;i<n.plugins.length;i++)eval('this.np'+i+'=n.plugins['+i+'].name');if(c.v>3){if(c.v>=4&&(c.b=="ns"||c.b=="ie")){this.je=(n.javaEnabled()==true)?"y":"n";}if(c.b=="ie"){this.ce=n.cookieEnabled;this.cp=n.cpuClass;}this.sw=w.width;this.sh=w.height;this.pd=w.colorDepth;if(this.pd==0){this.pd=w.pixelDepth;}var fs=w.fontSmoothingEnabled;if(fs){this.fs=fs?"y":"n";}}var tz=new Date();if(tz.getTimezoneOffset()==0){this.tz="0";}else{this.tz=tz.getTimezoneOffset()/60;}}
/* ------------------------------------------------------------
cmdatatagutils.js
---------------------------------------------------------------*/
<!--
/*
 * cmdatatagutils.js 
 * $Id: cmdatatagutils-5377-4360249-90074510-101007.txt 69744 2007-10-10 17:00:56Z hwhite $
 * $Revision: 69744 $
 *
 * Version 4.1.0
 *
 * Coremetrics Tag v4.0, 8/7/2006
 * COPYRIGHT 1999-2002 COREMETRICS, INC. 
 * ALL RIGHTS RESERVED. U.S.PATENT PENDING
 *
 * The following functions aid in the creation of Coremetrics data tags.
 *
 */
 
cm_ClientID         = "90074510";
cm_TrackLink        = "A";
cm_TrackImpressions = "RS";
var cm_JSFEnabled = false;

var cmJv = "1.0";
if (typeof(isNaN) == "function") cmJv = "1.1";
if (typeof(isFinite) == "function") cmJv = "1.2";
if (typeof(NaN) == "number") cmJv = "1.3";
if (typeof(decodeURI) == "function") cmJv = "1.5";
if (typeof(Array.forEach) == "function") cmJv = "1.6";
if (typeof(Iterator) == "object") cmJv = "1.7";

var cmCheckCMEMFlag = true;
  
/* TAG GENERATING FUNCTIONS */

/*
 * Calling this function points tags to the production database
 */
function cmSetProduction(){
	cm_HOST="data.coremetrics.com/eluminate?";
//	cm_JSFPCookieDomain = "somedomain.com";
}

function cmCreateManualImpressionTag(pageID, trackSP, trackRE) {
		// insert code to get pageID from cmTagControl if pageID is null
		cmMakeTag(["tid","9","pi",pageID,"cm_sp",trackSP,"cm_re",trackRE,"st",cm_ClientTS]);
}

function cmCreateManualLinkClickTag(href,name,pageID) {	
	if (cmCreateLinkTag == null && cM != null) {
		var cmCreateLinkTag = cM;
	}
	if (cmCreateLinkTag != null) {		
		var dt = new Date();
		cmLnkT3 = dt.getTime();
		cmCreateLinkTag(cm_ClientTS, cmLnkT3, name, href, false, pageID);
	}
}

/* manual PageviewTag for off site page tagging.  Allows client to supply URL and Referring URL
*/
function cmCreateManualPageviewTag(pageID, categoryID,DestinationURL,ReferringURL) {
	cmMakeTag(["tid","1","pi",pageID,"cg",categoryID,"ul",DestinationURL,"rf",ReferringURL]);
}

function cmCreatePageElementTag(elementID, elementCategory, pageID, pageCategoryID, elementLocation) {
	cmMakeTag(["tid","15","eid",elementID,"ecat",elementCategory,"pflg","0","pid",pageID,"pcat",pageCategoryID,"eloc",elementLocation]);
}

function cmCreateProductElementTag(elementID, elementCategory, productID, productCategoryID, elementLocation) {
	cmMakeTag(["tid","15","eid",elementID,"ecat",elementCategory,"pflg","1","pid",productID,"pcat",productCategoryID,"eloc",elementLocation]);
}

/*
 * Creates a Tech Props tag.
 * pageID		: required. Page ID to set on this Pageview tag
 */
function cmCreateTechPropsTag(pageID, categoryID) {
	if(pageID == null) { pageID = cmGetDefaultPageID(); }
	cmMakeTag(["tid","6","pi",pageID,"cg",categoryID,"pc","Y"]);
}

/*
 * Creates a Pageview tag with the given Page ID
 *
 * pageID	: required. Page ID to set on this Pageview tag
 * categoryID	: optional. Category ID to set on this Pageview tag
 * searchString	: optional. Internal search string enterred by user to reach
 *				  this page.
 *
 * 
 */
function cmCreatePageviewTag(pageID, categoryID, searchString, searchResults) {
	if (pageID == null) { pageID = cmGetDefaultPageID(); }
	cmMakeTag(["tid","1","pi",pageID,"cg",categoryID,"se",searchString,"sr",searchResults]);
}

/*
 * Creates a Pageview tag with the default value for Page ID. 
 * Format of Page ID is "x/y/z/MyPage.asp"
 *
 * 
 */
function cmCreateDefaultPageviewTag(categoryID) {
	cmCreatePageviewTag(cmGetDefaultPageID(), categoryID);
}

/*
 * Creates a Productview Tag
 * Also creates a Pageview Tag by setting pc="Y"
 * Format of Page ID is "PRODUCT: <Product Name> (<Product ID>)"
 *
 * productID	: required. Product ID to set on this Productview tag
 * productName	: required. Product Name to set on this Productview tag
 * categoryID	: optional. Category ID to set on this Productview tag 
 *
 * 
 */
function cmCreateProductviewTag(productID, productName, categoryID) {
	cmMakeTag(["tid","5","pi","PRODUCT: "+productName+" ("+productID+")","pr",productID,"pm",productName,"cg",categoryID,"pc","Y"]);
}

/*
 * Variables and Arrays to support Lineitem Aggregation
 */
var __sArray = new Array();
var __skuString = "";

function __cmGetPI(__id){
	var __pI;
	for (__pI = 0; __pI < __sArray.length; ++__pI) {
		if (__id == __sArray[__pI][1]) return __pI;
	}
	return -1;
}

function __cmGetPIPC(__pr,__cg) {
	var __pI;
	for (__pI = 0; __pI < __sArray.length; ++__pI) {
		if (__pr == __sArray[__pI][1] && __cg == __sArray[__pI][9]) return __pI;
	}
	return -1;
}

function cmAddShop(__v) {
	//var __i = __cmGetPIPC(__v[1],__v[9]); /* uncomment for productID-categoryID aggregation */
	var __i = __cmGetPI(__v[1]); /* uncomment for productID aggregation */
	if (__i == -1) {
		__sArray[__sArray.length] = __v;
	}
	else {
		var __oQ = __sArray[__i][5];
		var __oP = __sArray[__i][7];
		__sArray[__i][5] = parseInt(__sArray[__i][5]) + parseInt(__v[5]);
		__sArray[__i][7] = (((__v[7]*__v[5])+(__oP*__oQ))/__sArray[__i][5]);
	}
}

/*
 * Creates a Shop tag with Action 5 (Shopping Cart)
 *
 * productID	: required. Product ID to set on this Shop tag
 * quantity	: required. Quantity to set on this Shop tag
 * productPrice	: required. Price of one unit of this product
 * categoryID	: optional. Category to set on this Shop tag
 *
 * 
 */
function cmCreateShopAction5Tag(productID,productName,productQuantity,productPrice,categoryID, ArrivalDate, NumNights, DepartureDate, 
								NumAdults, NumChildren, SmokeFlag, BedType, RateType, PromoCode, IATACode) {
	var pattern = /[^0-9\.]/gi;
    productPrice = productPrice.toString().replace(pattern, "");
	cmAddShop(["pr",productID,"pm",productName,"qt",productQuantity,"bp",productPrice,"cg",categoryID,"at","5","tid","4","pc","N","sx1",ArrivalDate,"sx2",NumNights,
			   "sx3",DepartureDate,"sx4",NumAdults,"sx5",NumChildren,"sx6",SmokeFlag,"sx7",BedType,"sx8",RateType,"sx9",PromoCode,"sx10",IATACode]);
}
							  
/*
 * Creates a Shop tag with Action 9 (Order Receipt / Confirmed)
 *
 * productID	: required. Product ID to set on this Shop tag
 * productName	: required. Product Name to set on this Shop tag
 * quantity	: required. Quantity to set on this Shop tag
 * productPrice	: required. Price of one unit of this product
 * customerID	: required. ID of customer making the purchase
 * orderID	: required. ID of order this lineitem belongs to
 * orderTotal	: required. Total price of order this lineitem belongs to
 * categoryID	: optional. Category to set on this Shop tag
 *
 */
function cmCreateShopAction9Tag(productID,productName,productQuantity,productPrice,customerID,orderID,orderTotal,categoryID, ArrivalDate, NumNights, DepartureDate, 
								NumAdults, NumChildren, SmokeFlag, BedType, RateType, PromoCode, IATACode) {

	var pattern = /[^0-9\.]/gi;
    productPrice = productPrice.toString().replace(pattern, "");
	orderTotal = orderTotal.toString().replace(pattern, "");
	cmAddShop(["pr",productID,"pm",productName,"qt",productQuantity,"bp",productPrice,"cg",categoryID,"cd",customerID,"on",orderID,"tr",orderTotal,"at","9","tid","4","pc","N", "sx1",ArrivalDate,"sx2",NumNights,
			   "sx3",DepartureDate,"sx4",NumAdults,"sx5",NumChildren,"sx6",SmokeFlag,"sx7",BedType,"sx8",RateType,"sx9",PromoCode,"sx10",IATACode]);
	cmCalcSKUString();
}

function cmDisplayShop5s() {
	cmDisplayShops();
}

function cmDisplayShop9s() {
	cmCalcSKUString();
	cmDisplayShops();
}

function cmCalcSKUString() {
	__skuString = "";
	var __skuStringArray = new Array();
	for (i = 0; i < __sArray.length; ++i) {
		// aggregate
		var __skuStringArrayIndex = -1;
		for (y = 0; y < __skuStringArray.length; ++y) {
			if (__sArray[i][1] == __skuStringArray[y][0] ) {
				__skuStringArrayIndex = y;
			}
		}
		if (__skuStringArrayIndex == -1) {
			// it doesn't exist, so add it
			var newArrayIndex = __skuStringArray.length;
			__skuStringArray[newArrayIndex] = new Array();
			__skuStringArray[newArrayIndex][0] = __sArray[i][1];
			__skuStringArray[newArrayIndex][1] = __sArray[i][7];
			__skuStringArray[newArrayIndex][2] = __sArray[i][5];
		}
		else {
			// it exists, so update it
			var __oP = __skuStringArray[__skuStringArrayIndex][1];
			var __oQ = __skuStringArray[__skuStringArrayIndex][2];
			__skuStringArray[__skuStringArrayIndex][2] = parseInt(__sArray[i][5]) + __oQ;
			__skuStringArray[__skuStringArrayIndex][1] = (((__sArray[i][7]*__sArray[i][5])+(__oP*__oQ))/__sArray[i][5]);		
		}
	}
	for (x = 0; x < __skuStringArray.length; ++x) {
		__skuString += "|"+__skuStringArray[x][0]+"|"+__skuStringArray[x][1]+"|"+__skuStringArray[x][2]+"|";
	}
}

function cmDisplayShops() {
	var i;
	for (i = 0; i < __sArray.length; ++i) {
		cmMakeTag(__sArray[i]);
	}
	__sArray = new Array();
}

/*
 * Creates an Order tag
 *
 * orderID			: required. Order ID of this order
 * orderTotal		: required. Total of this order (minus tax and shipping)
 * orderShipping	: required. Shipping charge for this order
 * customerID		: required. Customer ID that placed this order
 * customerCity		: optional. City of Customer that placed this order
 * customerState	: optional. State of Customer that placed this order
 * customerZIP		: optional. Zipcode of Customer that placed this order
 *
 */
function cmCreateOrderTag(orderID,orderTotal,orderShipping,customerID,customerCity,customerState,customerZIP) {
						  
	var pattern = /[^0-9\.]/gi;
    orderShipping = orderShipping.toString().replace(pattern, "");
	orderTotal = orderTotal.toString().replace(pattern, "");
	cmMakeTag(["tid","3","osk",__skuString,"on",orderID,"tr",orderTotal,"sg",orderShipping,"cd",customerID,
			   "ct", customerCity,"sa",customerState,"zp",customerZIP]);
			   
	__skuString = "";
}

/*
 * Creates a Conversion Event tag
 *
 * eventID			: required. Conversion event ID
 * actionType		: required. 1=conversion initiation, 2=conversion completion
 * categoryID		: optional. Category for the event
 * points			: optional. Point value to assign to conversion.
 */
 function cmCreateConversionEventTag(eventID, actionType, categoryID, points) {
	cmMakeTag(["tid","14","cid",eventID,"cat",actionType,"ccid",categoryID,"cpt",points]);
 }

/*
 * Creates a Registration tag and/or a Newsletter tag
 *
 * customerID		: required for Registration. ID of Customer to register.
 * customerEmail	: required for Newsletters. Optional for Registration.
 * customerCity		: optional. City of Customer that placed this order
 * customerState	: optional. State of Customer that placed this order
 * customerZIP		: optional. Zipcode of Customer that placed this order
 * newsletterName	: required for Newsletters. The name of the Newsletter.
 * subscribe		: required for Newsletters. Either "Y" or "N"
 *
 */
function cmCreateRegistrationTag(customerID, customerEmail, customerCity,
				customerState, customerZIP, newsletterName, 
				subscribe,firstName, age, gender, country, minIncome, maxIncome, educationLevel, extraField11,
				extraField12, extraField13, extraField14, extraField15) {
	cmMakeTag(["tid","2","cd",customerID,"em",customerEmail,"ct",customerCity,"sa",customerState,
	           "zp",customerZIP,"nl",newsletterName,"sd",subscribe,"fn",firstName,"ag",age,"cy",country,
			   "ml", minIncome,"xl",maxIncome,"ed",educationLevel,"rg11",extraField11,"rg12",extraField12,
			   "rg13",extraField13,"rg14",extraField14,"rg15",extraField15]);
}

/* Creates an Error Tag
 *
 */
function cmCreateErrorTag(pageID, categoryID) {
	if(pageID == null) {
		pageID = cmGetDefaultPageID();
	}
	cmMakeTag(["tid","404","pi",pageID,"cg",categoryID,"pc","Y"]);
}

function cmMakeTag(__v) 
{
    var cm = new _cm("vn2", "e4.0");
    //var cm = new _cm("tid","6","vn2","e4.0");
 
    var i;
	for (i = 0; i < __v.length; i += 2) {
		var _n = __v[i];
		var _v = __v[i + 1];
		cm[_n] = _v;
	}

	if (cm.tid == "6") {
		//cm.addTP();
	}

	if (cm.tid == "1") {
		if (cI("cmTPSet") != 'Y') {
			cm.tid = "6";
			//cm.addTP();
			document.cookie = "cmTPSet=Y";
		}
	}

	if ((cm.pi == null) && (cm.pc == "Y")) {
		cm.pi = cmGetDefaultPageID();
	}

	if (parent.cm_ref != null) {
		cm.rf = parent.cm_ref;
		if (cm.pc == "Y") {
			parent.cm_ref = document.URL;
		}
	}

	// if parent had mmc variables and this is the first pageview, add mmc to this url
	if(parent.cm_set_mmc) {
		cm.ul = document.location.href + 
				((document.location.href.indexOf("?") < 0) ? "?" : "&") + 
				parent.cm_mmc_params; 
		if (cm.pc == "Y") {
			parent.cm_ref = cm.ul;
			parent.cm_set_mmc = false;
		}
	}

	if (cm.ul == null) {
		cm.ul = window.location.href;
	}

	//check for zero price and zero quantity
	cmSafeZero(cm,["qt","bp","tr","sg"]);

	//check for manual_cm_mmc parameter;
	if (this.manual_cm_mmc != null) {
		cm.ul = cm.ul + ((cm.ul.indexOf("&") == -1) ? ((cm.ul.indexOf("?") == -1) ? "?" : "&") : "&") + "cm_mmc=" + this.manual_cm_mmc;
	}

	// convert MMC parameters to lowercase;
	cm.ul = cm.ul.replace(/cm_mmc/gi,"cm_mmc");
	cm.ul = cm.ul.replace(/cm_ven/gi,"cm_ven");
	cm.ul = cm.ul.replace(/cm_cat/gi,"cm_cat");
	cm.ul = cm.ul.replace(/cm_pla/gi,"cm_pla");
	cm.ul = cm.ul.replace(/cm_ite/gi,"cm_ite");

    cm.writeImg();
	if (cmCheckCMEMFlag) {
		cmCheckCMEMFlag = false;
		cmCheckCMEM();
	}
	
}

// HELPER FUNCTIONS -----------------------------------------------------------
/* These functions are used by the tag-generating functions and/or may be used
 * in in general as convenience functions
 */

/*
 * Creates an acceptable default Page ID value to use for Pageview tags.
 * The default Page ID is based on the URL, and consists of the path and
 * filename (without the protocol, domain and query string).
 * 
 * example:
 * returns "x/y/MyPage.asp" for the URL http://www.mysite.com/x/y/MyPage.asp
 */
function cmGetDefaultPageID() { 
	var pageName = window.location.pathname; 

	// eliminates everything after "?" (for Opera browswers)
	var tempIndex1 = pageName.indexOf("?");
	if (tempIndex1 != -1) {
		pageName = pageName.substr(0, tempIndex1);
	}
	// eliminates everything after "#" (for Opera browswers)
	var tempIndex2 = pageName.indexOf("#");
	if (tempIndex2 != -1) {
		pageName = pageName.substr(0, tempIndex2);
	}
	// eliminates everything after ";"
	var tempIndex3 = pageName.indexOf(";");
	if (tempIndex3 != -1) {
		pageName = pageName.substr(0, tempIndex3);
	}

	var slashPos = pageName.lastIndexOf("/");
	if (slashPos == pageName.length - 1) {
		pageName = pageName + "default.asp"; /****************** SET TO DEFAULT DOC NAME */
	}

	while (pageName.indexOf("/") == 0) {
		pageName = pageName.substr(1,pageName.length);
	}

	return(pageName); 
} 

function cmIndexOfParameter (parameter, inString) {
	return inString.indexOf(parameter);
}

function cmExtractParameter (parameter, inString) {
    if (cmIndexOfParameter(parameter, inString) == -1) {
        return null;
    }
	var s = inString;
	var begin = s.indexOf(parameter);
	var end = s.indexOf("&", begin);
	if (end == -1) {
		end = s.length;
	}
	var middle = s.indexOf("=", begin);
	return s.substring(middle + 1, end);
}

function cmRemoveParameter (parameter, inString) {
    if (cmIndexOfParameter(parameter, inString) == -1) {
        return inString;
    }
	var s = inString;
	var begin = s.indexOf(parameter);
	var start = (begin - 1);
	var end = s.indexOf("&", begin);
	if (end == -1) {
		end = s.length;
	}
	if (s.substring(start, begin) == "?") {    // retain leading "?"
		start = (start + 1);
		end = (end + 1);
	}
	return s.substring(0, start) + s.substring(end, s.length);
}

function cmCheckCMEM() {
	if (cmIndexOfParameter("cm_em",document.location.href) != -1){
		var emailAddress = cmExtractParameter("cm_em",document.location.href);
		cmCreateRegistrationTag(emailAddress,emailAddress);
	}
	if (cmIndexOfParameter("cm_lm",document.location.href) != -1){
		var emailAddress = cmExtractParameter("cm_lm",document.location.href);
		cmCreateRegistrationTag(emailAddress,emailAddress);
	}
}

function cmSafeZero(cm, checkArray) {
	// put logic here to convert number 0 to string "0"
	for (i = 0; i < checkArray.length; ++i) {
		if ((cm[checkArray[i]] != null) && (cm[checkArray[i]] == 0)) {
			cm[checkArray[i]] = "0";
		}
	}
}

if (defaultNormalize == null) { var defaultNormalize = null; }

function myNormalizeURL(url, isHref) {
    var newURL = url;
    // ... transform newURL here ...
    if (defaultNormalize != null) {
        newURL = defaultNormalize(newURL, isHref);
    }
    return newURL;
}

// install normalization
if (document.cmTagCtl != null) {
    var func = "" + document.cmTagCtl.normalizeURL;
    if (func.indexOf('myNormalizeURL') == -1) {
        defaultNormalize = document.cmTagCtl.normalizeURL;
        document.cmTagCtl.normalizeURL = myNormalizeURL;
    }
}

//-->

  
  /* ------------------------------------------------------------
CheckAvailability.js
---------------------------------------------------------------*/ 

            
function TestValidateArrivalDate(arrivalDate, args)
{
    ValidateDate_ddcArrivalDate( 'ddcArrivalDate' );
    if ( typeof( GetDate_ddcArrivalDate ) == 'function' )
        arrivalDate = GetDate_ddcArrivalDate();
        
    var currentDate = new Date();
    currentDate.setHours( 0, 0, 0, 0 );
    
    args.IsValid = ( currentDate <= arrivalDate );
}
function TestValidateDepartureDate(departureDate, args)
{
    ValidateDate_ddcDepartureDate( 'ddcDepartureDate' );
    if ( typeof( GetDate_ddcDepartureDate ) == 'function' )
        departureDate = GetDate_ddcDepartureDate();
        
    var arrivalDate = null;
    if ( typeof( GetDate_ddcArrivalDate ) == 'function' )
        arrivalDate = GetDate_ddcArrivalDate();
        
    args.IsValid = ( arrivalDate && arrivalDate < departureDate );
 }

function ValidateDate_ddcArrivalDate( type)
{    
    var arrivalDate = null;
    var departureDate = null;
    
    if ( typeof( GetDate_ddcArrivalDate ) == 'function' )
        arrivalDate = GetDate_ddcArrivalDate();
        
    if ( typeof( GetDate_ddcDepartureDate ) == 'function' )
        departureDate = GetDate_ddcDepartureDate();
    
    if ( !arrivalDate || !departureDate )
        return;
        
    var currentDate = new Date();
    currentDate.setHours( 0, 0, 0, 0 );

//MODIFIED    
    // if the arrival date is in the past then update the year
    var changedArrival = CheckCurrent( arrivalDate,arrivalDateErrorMessage );
    if ( ( changedArrival ) && ( typeof( SetDate_ddcArrivalDate ) == 'function' ) )
        SetDate_ddcArrivalDate( arrivalDate );
    
    if (departureDate <= arrivalDate) 
    {
        departureDate = arrivalDate;
        departureDate.setDate(arrivalDate.getDate() + 1);
        if ( typeof( SetDate_ddcDepartureDate ) == 'function' )
            SetDate_ddcDepartureDate( departureDate );
    }
}


function ValidateDate_ddcDepartureDate( type )
{
   
    var arrivalDate = null;
    var departureDate = null;
    
    if ( typeof( GetDate_ddcArrivalDate ) == 'function' )
        arrivalDate = GetDate_ddcArrivalDate();
        
    if ( typeof( GetDate_ddcDepartureDate ) == 'function' )
        departureDate = GetDate_ddcDepartureDate();
    
    if ( !arrivalDate || !departureDate )
        return;
   
   var currentDate = new Date();
    currentDate.setHours( 0, 0, 0, 0 );
   // if the arrival date is in the past then update the year
    var changedDeparture = CheckCurrent( departureDate,departureDareErrorMessage );
    if ( ( changedDeparture ) && ( typeof( SetDate_ddcDepartureDate ) == 'function' ) )
    {            
            SetDate_ddcDepartureDate( departureDate);
    }    

    if (departureDate <= arrivalDate) 
    {
        departureDate = arrivalDate;
        departureDate.setDate(arrivalDate.getDate() + 1);
        if ( typeof( SetDate_ddcDepartureDate ) == 'function' )
            SetDate_ddcDepartureDate( departureDate );
    }
}
  /* ------------------------------------------------------------
DropdownCalendar.js
---------------------------------------------------------------*/ 
// Properties
var daysArray = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
var monthsArray = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var NewCalanderDate=0;

function ToggleDropdownCalendar( containerID )
{

    var calendar = document.getElementById(containerID);
    if ( calendar == null || typeof( calendar ) == 'undefined' )
        return;
    //alert(pos1[0]+'-----' + pos1[1]);
    //alert(pos2[0]+'-----' + pos2[1]);
    //debugger;
    if (calendar.style.display == "block" )
    {
        HidePopupDiv(containerID);
        //calendar.style.display = "none";
    }
    else
    {
      calendar.style.marginLeft = "0px";
      calendar.style.display = "block";
     
     
     //START : 7/6/2008 : Gulshan Gulati :Below code added to maintain dropdown calendar position with calendar image
      var imgArrPosition;
      var imgDptPosition;
      
      if (containerID.indexOf("ddcDepartureDate") == -1)
      {
        var imgArrDateID  = containerID.substring(0,containerID.lastIndexOf('_')) + '_imgCalendar';
        imgArrPosition = findPos(document.getElementById(imgArrDateID ));
        calendar.style.left = imgArrPosition[0] - calendar.offsetWidth - 10 + 'px';
        calendar.style.top = imgArrPosition[1] - calendar.offsetHeight + 20 + 'px';
      }
      else
      {
        var imgDptDateID = containerID.substring(0,containerID.lastIndexOf('_')) + '_imgCalendar';
        imgDptPosition = findPos(document.getElementById(imgDptDateID));
        calendar.style.left = imgDptPosition[0] - calendar.offsetWidth - 10 + 'px';
        calendar.style.top = imgDptPosition[1] - 5 + 'px';
      }
     //END : 7/6/2008 : Gulshan Gulati :Below code added to maintain dropdown calendar position with calendar image 
     
     if(calendar.offsetLeft < 0)
     {
        if (containerID.indexOf("ddcReservationDepartureDate") == -1)
        {
            var imgArrDateID  = containerID.substring(0,containerID.lastIndexOf('_')) + '_imgCalendar';
            imgArrPosition = findPos(document.getElementById(imgArrDateID ));
            calendar.style.left = imgArrPosition[0] + 'px';
            calendar.style.top = imgArrPosition[1] - calendar.offsetHeight - 15 + 'px';
        }
        else
        {
            var imgDptDateID = containerID.substring(0,containerID.lastIndexOf('_')) + '_imgCalendar';
            imgDptPosition = findPos(document.getElementById(imgDptDateID));
            calendar.style.left = imgArrPosition[0] + 'px';
            calendar.style.top = imgDptPosition[1] + 25 + 'px';
        }
      }
        ShowPopupDiv(containerID);
      
    }
}

    /// Code By Somil to fixed Combo -Div Display order problem. --- Starts
    //var g_PopupIFrame;
    function IsIE()
    {
        return ( navigator.appName=="Microsoft Internet Explorer" );
    }

    function HidePopupDiv(divID)
    {

        var divPopup;
        divPopup=document.getElementById(divID);
        divPopup.style.display = "none";

        if (IsIE())
        {
            var iFrame;
            iFrame = document.getElementById(divID + 'iFrame');
            document.body.removeChild(iFrame);
            iFrame=null;
        }
    }

    function ShowPopupDiv(divID)
    {
        var divPopup=document.getElementById(divID);
        if (!IsIE())
        {
            //Just display the div
            divPopup.style.display ="block";
            return;
        }

        //Increase default zIndex of div by 1, so that DIV appears before IFrame
        divPopup.style.zIndex=divPopup.style.zIndex+1;
    
        var iFrame = document.createElement("IFRAME");
        
        iFrame.id=divID + 'iFrame';
        
        iFrame.setAttribute("src", "/BlankHTMlForIframeSSL.htm");

        //Match IFrame position with divPopup
        iFrame.style.position="absolute";
        iFrame.style.left =divPopup.offsetLeft + 'px';
        iFrame.style.top =divPopup.offsetTop + 'px';
        iFrame.style.width =divPopup.offsetWidth + 'px';
        iFrame.style.height =divPopup.offsetHeight + 'px';
        document.body.appendChild(iFrame);
        divPopup.style.display ="block";
        
    }
/// Code By Somil to fixed Combo -Div Display order problem. --- Ends


//For Postion of calendar.

function findPos(obj)
{
var curleft = curtop = curBottom = curRight = 0;
    if (obj.offsetParent)
     {  curleft = obj.offsetLeft;
        curtop = obj.offsetTop;
        while (obj = obj.offsetParent)
        {
            curleft += obj.offsetLeft
            curtop += obj.offsetTop
        }
      }
    return [curleft,curtop];
}



function FormatTitle( month, year )
{
    return month + "\u00a0" + year;
}

function GetCalendarDate( ddlDayID, ddlMonthID, ddlYearID  )
{
    var ddlDay, ddlMonth, ddlYear
   
    ddlDay = document.getElementById(ddlDayID);
    ddlMonth = document.getElementById(ddlMonthID);
    ddlYear = document.getElementById(ddlYearID);
    
    var day = ddlDay.options[ddlDay.selectedIndex].value;
    var month = ddlMonth.options[ddlMonth.selectedIndex].value;
    var year = ddlYear.options[ddlYear.selectedIndex].value;
    
    month = parseInt( month,10) - 1;
    
    var date = new Date(parseInt(year,10),month,parseInt( day,10),11,0,0);
    return date;
}

function RefreshControls(date, ddlDayID, ddlMonthID, ddlYearID, txtDayOfWeekID )
{
    var tempMonth = date.getMonth() + 1;
    if (tempMonth < 10) tempMonth = "0" + tempMonth;
    tempMonth = tempMonth.toString();
    
    var day = date.getDate().toString();
    if ( day.length == 1 )
        day = "0" + day;

    var ddlDay = document.getElementById(ddlDayID);
    UpdateDayDropDown( ddlDay, date );
   
    var ddlMonth = document.getElementById(ddlMonthID);
    SelectCalendarDropdown(ddlMonth, tempMonth);
    
    var ddlYear = document.getElementById(ddlYearID);
    SelectCalendarDropdown(ddlYear, date.getFullYear());
    
    var txtDayOfWeek = document.getElementById( txtDayOfWeekID );

    if ( txtDayOfWeek )
        txtDayOfWeek.innerHTML = date.getDayOfWeekName();
}

function UpdateDayDropDown( ddlDay, date )
{
    if ( !ddlDay )
        return;
        
    var copyDate = new Date();
    copyDate.setFullYear( date.getFullYear() );
    copyDate.setMonth( date.getMonth() );
    copyDate.setDate( 1 );
    
    var day = date.getDate().toString();
    if ( day.length == 1 )
        day = "0" + day;
    day = day.toString();
    
    // clear the dropdown
    ddlDay.options.length = 0;
    
    var month = copyDate.getMonth();
    var i = 0;
    while ( month == copyDate.getMonth() )
    {
        var val = copyDate.getDate();
        if ( val.toString().length == 1 )
            val = "0" + val;
        val = val.toString();
        
        ddlDay.options[ i ] = new Option( val, val );
        if (  val == day  )
            ddlDay.options[ i ].selected = true;
        
        copyDate.setDate( copyDate.getDate() + 1 );    
        i++;
    }
}

function OnDropDownChange( id, ddlDayID, ddlMonthID, ddlYearID, txtDayOfWeekID )
{
    try
    {
    
        eval( 'ValidateDate_' + id )( id);
        
    }
    catch(ex)
    {}
    
}

function SelectCalendarDropdown(obj, sel)
{

    for (var index = 0; index < obj.options.length; index++ )
    {
        if ( obj.options[index].value == sel)
            obj.options[index].selected = true;
        else
            obj.options[index].selected = false;
    }
    
}

// Event handlers for the calendar elements

function addDropdownCalendarMonths( n, calendarID, controlID, ddlDayID, ddlMonthID, ddlYearID, txtDayOfWeekID )
{
    // Advance the calendar month and update the display
    var targetDate = GetCalendarDate( ddlDayID, ddlMonthID, ddlYearID );    
    NewCalanderDate = NewCalanderDate+n;
    targetDate.addMonths(NewCalanderDate);
    DrawCalendar( calendarID, controlID, ddlDayID, ddlMonthID, ddlYearID, txtDayOfWeekID, targetDate );
}

function addDropdownCalendarYears( n, calendarID, controlID, ddlDayID, ddlMonthID, ddlYearID, txtDayOfWeekID  )
{
    var targetDate = GetCalendarDate( ddlDayID, ddlMonthID, ddlYearID );
    targetDate.addYears(n);
    DrawCalendar( calendarID, controlID, ddlDayID, ddlMonthID, ddlYearID, txtDayOfWeekID, targetDate);
}

function getMonthNumber(month)
{
    for (var i in monthsArray)
    {
        if (monthsArray[i] == month)
        {
            i++;
            if (i < 10) i = "0" + i;
            return i;
        }
    }
}

// Add new properties and methods to the Date object
// Methods
Date.prototype.getDayOfWeekName = dateGetDayOfWeekName;
Date.prototype.getMonthName = dateGetMonthName;
Date.prototype.getDays      = dateGetDays;
Date.prototype.addDays      = dateAddDays;
Date.prototype.addMonths    = dateAddMonths;
Date.prototype.addYears     = dateAddYears;

// getMonthName(): Returns the name of the date's month
function dateGetMonthName()
{
    return this.monthNames[this.getMonth()];
}

function dateGetDayOfWeekName()
{
    return this.daysOfWeekNames[ this.getDay() ];
}

// getDays(): Returns the number of days in the date's month
function dateGetDays()
{
    var tmpDate, d, m;

    tmpDate = new Date(Date.parse(this));
    m = tmpDate.getMonth();
    d = 28;
    do
    {
        d++;
        tmpDate.setDate(d);
    } while (tmpDate.getMonth() == m);

    return d - 1;
}

// addDays(n): Adds the specified number of days to the date
function dateAddDays(n)
{
    // Add the specified number of days
    this.setDate(this.getDate() + n);

    // Reset the new day of month.
    this.savedDate = this.getDate();
}

// addMonths(n): Adds the specified number of months to the date, adjusting
// the day of the month if necessary
function dateAddMonths(n)
{
    // Save the day of month if not already set
    if (this.savedDate == null)
    this.savedDate = this.getDate();

    // Set the day of month to the first to avoid rolling
    this.setDate(1);

    // Add the specified number of months
    this.setMonth(this.getMonth() + n);

    // Restore the saved day of month, if possible
    this.setDate(Math.min(this.savedDate, this.getDays()));
}

// addYears(n): Adds the specified number of years to the date, adjusting the
// day of the month for leap years
function dateAddYears(n)
{
    // Save the day of month if not already set
    if (this.savedDate == null)
    this.savedDate = this.getDate();

    // Set the day of month to the first to avoid rolling
    this.setDate(1);

    // Add the specified number of years
    this.setFullYear(this.getFullYear() + n);

    // Restore the saved day of month, if possible
    this.setDate(Math.min(this.savedDate, this.getDays()));
}


               
function DrawCalendar( containerID, controlID, ddlDayID, ddlMonthID, ddlYearID, txtDayOfWeekID, targetDate  )
{
    var container = document.getElementById(containerID);
    if ( container == null || typeof( container ) == 'undefined' )
        return;
    
    // clear old results
    container.innerHtml = null;
    
    if ( !targetDate )
        targetDate = GetCalendarDate( ddlDayID, ddlMonthID, ddlYearID );
        
    // get month name
    var headerTitle = FormatTitle( targetDate.getMonthName(), targetDate.getFullYear() );
    
    var currentDate = new Date();
    var hidePreviousLink = ((targetDate.getMonth() - 1) < currentDate.getMonth() && targetDate.getFullYear() == currentDate.getFullYear());
    
    if(isNaN(targetDate))
		targetDate = new Date();
    
    // Start with the first day of the month and go back if necessary to the previous Sunday
    tmpDate = new Date(Date.parse(targetDate));
    tmpDate.setDate(1);
    while (tmpDate.getDay() != 0)
    {
        tmpDate.addDays(-1);
    }
     
    // draw the table
    var calendarHtml = "<table id='nuggetCalendar' class='calendar'>";
    calendarHtml += "<tr class='header'>";
    calendarHtml += "<th id='nuggetCalendarPrevLink'><a href='#' title='Previous Month' onclick=\"addDropdownCalendarMonths(-1,";
    calendarHtml += "'" + containerID + "', '" + controlID + "', '" + ddlDayID + "', '" + ddlMonthID + "', '" + ddlYearID + "', '" + txtDayOfWeekID + "' ); return false;\">";
        
    if ( !hidePreviousLink )
        calendarHtml += "&lt;&lt;";
    else  
        calendarHtml += "";
    calendarHtml += "</a></th>";
        
    calendarHtml += "<th id='nuggetCalendarHeader' colspan='5'>" + headerTitle + "</th>";
    
    calendarHtml += "<th id='nuggetCalendarNextLink'><a href='#' title='Next Month' onclick=\"addDropdownCalendarMonths(1, ";
    calendarHtml += "'" + containerID + "', '" + controlID + "', '" + ddlDayID + "', '" + ddlMonthID + "', '" + ddlYearID + "', '" + txtDayOfWeekID + "' ); return false;\">";
    calendarHtml += "&gt;&gt;</a></th>" ;
    calendarHtml += "</tr>";
    
    calendarHtml += "<tr class='days'>";
    
    var daysOfWeek = new Date();
    for( var i = 0; i < daysOfWeek.daysOfWeekNames.length; i++ )
    {
        calendarHtml += "<th>" + daysOfWeek.daysOfWeekNames[ i ] + "</th>";
    }
     
    calendarHtml += "</tr>";
    
    // Go through each calendar day cell in the table and update it
    for (i = 0; i <= 5; i++)
    {
        // Hide row if it contains no dates in the current month
        tmpDate2 = new Date(Date.parse(tmpDate));
        tmpDate2.addDays(6);
        
        calendarHtml += "<tr ";
        if (tmpDate.getMonth()  != targetDate.getMonth() && tmpDate2.getMonth() != targetDate.getMonth() ) 
            calendarHtml += "class='empty'";
        
        calendarHtml += ">";
            
         // Loop through a week
        for (j = 0; j < 7; j++)
        {
            calendarHtml += "<td ";
            
            var cellClass = "";
            if ( j == 0 || j == 6 )
                 cellClass = "weekend";
                 
            // check if this is the current date
            var now = new Date();
            if ( (now.getFullYear() == tmpDate.getFullYear()) &&
                    (now.getDate() == tmpDate.getDate()) &&
                    (now.getMonth() == tmpDate.getMonth()))
                 cellClass = cellClass + " target";
                 
            // set the class
            if ( cellClass.length > 0 )
                calendarHtml += "class='" + cellClass + "'";
            
            calendarHtml += "><a href='#' style='cursor:hand' ";
                        
            if (tmpDate.getMonth() == targetDate.getMonth())
            {
                calendarHtml += " date='" + new Date(Date.parse(tmpDate)) + "'";
                calendarHtml += " DayID='" + ddlDayID + "'";
                calendarHtml += " MonthID='" + ddlMonthID + "'";
                calendarHtml += " YearID='" + ddlYearID + "'";
                calendarHtml += " DayOfWeekID='" + txtDayOfWeekID + "'";
                calendarHtml += " ContainerID='" + containerID + "'";
                calendarHtml += " ControlID='" + controlID + "'";
                                
                var s = tmpDate.toString().split(" ");
                calendarHtml += " title='" + s[0] + " " + s[1] + " " + s[2] + ", " + s[s.length - 1] + "'";
                calendarHtml += " onclick='DateClicked(event, true);'";
                calendarHtml += ">" + tmpDate.getDate();
            }
            else
            {
                calendarHtml += " style='display:none' ";
                calendarHtml += ">";
            }
            
            calendarHtml += "</a></td>";
            
            // Go to the next day
            tmpDate.addDays(1);
        }
        
        calendarHtml += "</tr>";
        
        if (tmpDate.getMonth() > targetDate.getMonth())
            i = 20;
    }
    
    calendarHtml += "</table>";

    container.innerHTML = calendarHtml;
	

}

function DateClicked(e, toggle) {
    if (!e) e = window.event;
    var eventElement = window.event ? e.srcElement : e.target;
    var DayID = eventElement.getAttribute("DayID");
    var MonthID = eventElement.getAttribute("MonthID");
    var YearID = eventElement.getAttribute("YearID");
    var DayOfWeekID = eventElement.getAttribute("DayOfWeekID");
    var ContainerID = eventElement.getAttribute("ContainerID");
    var ControlID = eventElement.getAttribute("ControlID");
    var TargetDate = new Date(Date.parse(eventElement.getAttribute("date")));
    DropDownSelectDate(TargetDate, DayID, MonthID, YearID, DayOfWeekID, ContainerID, ControlID, toggle);
    if (e.preventDefault) e.preventDefault(); else e.returnValue = false;
}
//Modified by Arshad 10 Oct, 07.
function DropDownSelectDate(TargetDate, DayID, MonthID, YearID, DayOfWeekID, ContainerID, ControlID, toggle) {
    //alert(ControlID);
    //CheckCurrent( TargetDate,ErrorMessage );
    RefreshControls( TargetDate, DayID, MonthID, YearID, DayOfWeekID );
    OnDropDownChange( ControlID, DayID, MonthID, YearID, DayOfWeekID );
    if (toggle) ToggleDropdownCalendar( ContainerID );
}

function CheckCurrent( verifyDate,errorMessage )
{
    var currentDate = new Date();
    currentDate.setHours( 0, 0, 0, 0 );
    
    var changedDate = false;
    
    /////////////////Added by Tony Guo on August 16, 2007 Ver5.11/////////////////////
    if (verifyDate.getFullYear() == currentDate.getFullYear() && verifyDate.getMonth() < currentDate.getMonth())
       {
        verifyDate.setFullYear( currentDate.getFullYear()+1 );       
       return true;
       }
    else if (verifyDate.getFullYear() == currentDate.getFullYear() && verifyDate.getMonth() == currentDate.getMonth() && verifyDate.getDate() < currentDate.getDate())
       {
       if (currentDate.getMonth()<11)
           verifyDate.setMonth( currentDate.getMonth()+1 );       
       else
          {
           verifyDate.setMonth( 0 ); 
           verifyDate.setFullYear( currentDate.getFullYear()+1 );                       
          }
       return true;
       }
        
    //////////////////////////////////////////////////////////////////////////////////
    
    // if the arrival date is in the past then update the year
    if ( ( verifyDate.getFullYear() == currentDate.getFullYear() ) && 
            ( ( verifyDate.getMonth() < currentDate.getMonth() ) ||
                ( ( verifyDate.getMonth() == currentDate.getMonth() ) &&
                    ( verifyDate.getDate() < currentDate.getDate() ) )
            ) 
        )
    {
        
        alert(errorMessage);
        
        changedDate = false;
        
        //verifyDate.setFullYear( currentDate.getFullYear() + 1 );
    }
    if ( verifyDate.getFullYear() < currentDate.getFullYear() )
    {
        changedDate = true;
        verifyDate.setFullYear( currentDate.getFullYear() );
    }
        
    if ( ( verifyDate.getFullYear() == currentDate.getFullYear() ) && 
            ( verifyDate.getMonth() < currentDate.getMonth() ) )
     {
        changedDate = true;
        verifyDate.setMonth( currentDate.getMonth() );
    }
        
    if ( ( verifyDate.getFullYear() == currentDate.getFullYear() ) && 
            ( verifyDate.getMonth() == currentDate.getMonth() ) && 
            ( verifyDate.getDate() < currentDate.getDate() ) )
     { 
        changedDate = true;
        verifyDate.setDate( currentDate.getDate() );
     }  
     return changedDate; 
}
  /* ------------------------------------------------------------
BrowserDetection.js
---------------------------------------------------------------*/ 
function isOperaBrowser(sUserAgent)
{
	return sUserAgent.indexOf("Opera") > -1;
}

function isSafariBrowser(sUserAgent)
{
	if(isKHTMLBrowser(sUserAgent))
		return sUserAgent.indexOf("AppleWebKit") > -1;
}

function isKHTMLBrowser(sUserAgent)
{
	return sUserAgent.indexOf("KHTML") > -1 || sUserAgent.indexOf("Konqueror") > -1 || sUserAgent.indexOf("AppleWebKit") > -1;
}

function isIEBrowser(sUserAgent)
{
	return sUserAgent.indexOf("compatible") > -1 && sUserAgent.indexOf("MSIE") > -1 && !isOperaBrowser(sUserAgent);
}

function isFirefoxBrowser(sUserAgent)
{
	return sUserAgent.indexOf("Firefox") > -1;
}

  /* ------------------------------------------------------------
FlashPlayerDetection.js
---------------------------------------------------------------*/ 
function isFlashPresent()
{
	if(isIEBrowser(navigator.userAgent))
	{
		var found=false;
		var axo;
		try
		{
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
			found=true;
		} 
		catch (e)
		{
		}
		if (!found)
		{
			try
			{
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				found=true;
			} 
			catch (e)
			{
			}
		}
		if (!found)
		{
			try 
			{
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
				found=true;
			} 
			catch (e) {
			}
		}
		if (!found)
		{
			try 
			{
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
				found=true;
			} 
			catch (e) 
			{
			}
		}
		if (!found)
		{
			try
			{
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				found=true;
			} 
			catch (e) 
			{
			}
		}
		if(found)
			return true;
		else
			return false;
	}
	else
	{
		if (navigator.plugins != null && navigator.plugins.length > 0)
		{
			if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])
			{
				return true;
			}
		}
		else
		{
			return false;
		}	
	}
}
  /* ------------------------------------------------------------
AC_RunActiveContent.js
---------------------------------------------------------------*/ 
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '></embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
	  alert(classid);
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

