function clearstatus(){
} 
 function MM_swapImage() { //v2.0
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
	objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
	if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
		(objStr.indexOf('document.all[')   ==0 && document.all   ==null))
	  objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
	obj = eval(objStr);
	if (obj != null) {
	  swapArray[j++] = obj;
	  swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
	  obj.src = MM_swapImage.arguments[i+2];
  } }
  document.MM_swapImgData = swapArray; 
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

MM_preloadImages('images/left2_over.jpg', 'images/left3_over.jpg','images/left4_over.jpg','images/left5_over.jpg','images/left6_over.jpg','images/left7_over.jpg', 'images/left8_over.jpg', 'images/left9_over.jpg', 'images/left11_over.jpg', 'images/left12_over.jpg', 'images/left13_over.jpg', 'images/left14_over.jpg', 'images/left15_over.jpg',  'images/top3_over.jpg', 'images/top4_over.jpg', 'images/top5_over.jpg', 'images/top6_over.jpg', 'images/top7_over.jpg', 'images/top8_over.jpg');

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);



           var totalTabs = 4; //change this number to reflect the number of tabs.  You can probably set this dynamically.

            function tabClick(tabid)
            {
                var currTab = getCookie("currTab");
                var id;
                if (currTab != "1" && currTab != null)
                    id = currTab;
                else
                    id = tabid;
                    
                deleteCookie("currTab", "", "") 
                
	            // reset all tabs
	            var tab = new Object();
	            for (var i=1;i<=totalTabs;i++)
	            {
		            tab = document.getElementById("tab" + i);
		            tab.className = "tab";
	            }	
	            // set tab that matches the id being passed in
	            tab = document.getElementById("tab" + id);
	            tab.className = "tab on";
            	
	            //put down content with proper id
	            //you can make this function call another funciton that uses ajax 
	            //to put content here and then do innerHTML to the target div.  
	            //if you want to.  
            	
	            // but I'm gonna just hide and show divs here.
            	
            	
	            var content = new Object();
	            //hide all
	            for (var i=1;i<=totalTabs;i++)
	            {
		            content = document.getElementById("tabContent" + i);
		            content.style.display = "none";
	            }
	            //show content with the target I
	            content = document.getElementById("tabContent" + id);	
	            content.style.display = "block";
            }
            
            function CheckAllDataGridCheckBoxes(aspCheckBoxID, checkVal) 
			{
				re = new RegExp(aspCheckBoxID + '$')  

				for(i = 0; i < document.forms[0].elements.length; i++) 
				{
					elm = document.forms[0].elements[i]
					if (elm.type == 'checkbox') 
					{
						if (re.test(elm.name)) 
	    				{
							elm.checked = checkVal
						}
					}
				}
			}


//------------------------------------------------------------------------------------------------------------------------//
// Functions for  Cookies
//------------------------------------------------------------------------------------------------------------------------//
/**
 * Sets a Cookie with the given name and value.
 *
 * name      Name of the cookie
 * value     Value of the cookie
 * [expires] Expiration date of the cookie (default: end of current session)
 * [path]    Path where the cookie is valid (default: path of calling document)
 * [domain]  Domain where the cookie is valid (default: domain of calling document)
 * [secure]  Boolean value indicating if the cookie transmission requires a secure transmission
 */


function setCookie(name, value, expires, path, domain, secure) {
	var cookieStr;
	cookieStr = name + "=" + escape(value);
	cookieStr += ((expires) ? "; expires=" + expires.toGMTString() : "");
	cookieStr += ((path) ? "; path=" + path : "");
	cookieStr += ((domain) ? "; domain=" + domain : "");
	cookieStr += ((secure) ? "; secure" : "");
	document.cookie = cookieStr;
}
/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function getCookie(name) {
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	} else {
		begin += 2;
	}
	var end = document.cookie.indexOf(";", begin);
	if (end == -1) {
		end = dc.length;
	}
	return unescape(dc.substring(begin + prefix.length, end));
}
/**
 * Deletes the specified cookie.
 *
 * name     name of the cookie
 * [path]   path of the cookie (must be same as path used to create cookie)
 * [domain] domain of the cookie (must be same as domain used to create cookie)
 */
function deleteCookie(name, path, domain) {
	if (getCookie(name)) {
		var cookieStr;
		cookieStr = name + "=";
		cookieStr += ((path) ? "; path=" + path : ""); //defaultPath);
		cookieStr += ((domain) ? "; domain=" + domain : "");
		cookieStr += "; expires=Thu, 01-Jan-70 00:00:01 GMT";
		document.cookie = cookieStr;
	}
}





function LTrim(s)
{
	// Devuelve una cadena sin los espacios del principio
	var i=0;
	var j=0;
	
	// Busca el primer caracter <> de un espacio
	for(i=0; i<=s.length-1; i++)
		if(s.substring(i,i+1) != ' '){
			j=i;
			break;
		}
	return s.substring(j, s.length);
}
function RTrim(s)
{
	// Quita los espacios en blanco del final de la cadena
	var j=0;
	
	// Busca el œltimo caracter <> de un espacio
	for(var i=s.length-1; i>-1; i--)
		if(s.substring(i,i+1) != ' '){
			j=i;
			break;
		}
	return s.substring(0, j+1);
}
function Trim(s)
{
	// Quita los espacios del principio y del final
	str = LTrim(RTrim(s));
	if(str == ' ')
		str = '';
	return str;
}
function StringReplace(originalText, findText, replaceText ) { 	
	while(originalText.lastIndexOf(findText)>=0)
	{
		originalText = originalText.replace(findText,replaceText);
	}
	return originalText;
}





