//==============================================================================
//==============================================================================
function GetXmlHttpObject(handler)
{
      var xmlHttp = null;
      if (window.XMLHttpRequest) 
      { // Mozilla, Safari,...
         xmlHttp = new XMLHttpRequest();
         if(xmlHttp.overrideMimeType) 
         {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            xmlHttp.overrideMimeType('text/html');
         }
      } 
      else if (window.ActiveXObject) 
      { // IE
         try 
         {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
         } 
         catch (e) 
         {
            try 
            {
               xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            } 
            catch (e) 
            {
            	
            }
         }
      }
      return xmlHttp;
}
//==============================================================================
//==============================================================================
//==============================================================================
function ChangeOnlyAction(my_action)
{
	location = my_action;
}
//==============================================================================
//==============================================================================
//==============================================================================
function ViewThisElement(element_id)
{
	if(document.getElementById(element_id) != null)
		document.getElementById(element_id).style.display = "block";
}
//==============================================================================
function HideThisElement(element_id)
{
	if(document.getElementById(element_id) != null)
		document.getElementById(element_id).style.display = "none";
}
//==============================================================================
function ViewOrHideThisElement(element_id)
{
	if(document.getElementById(element_id) != null)
	{
		if(document.getElementById(element_id).style.display == "block")
			document.getElementById(element_id).style.display = "none";
		else
			document.getElementById(element_id).style.display = "block";
	}
}
//==============================================================================
//==============================================================================
function ChangeStyleMenuItem(element_id, color, img)
{
	if(document.getElementById(element_id) != null)
	{
		var nodeObj = document.getElementById(element_id);
		nodeObj.style.backgroundColor = ''+color+'';
		nodeObj.style.backgroundImage = "url("+img+")";
	}
}
//==============================================================================
function CreatePath(div_id, my_str)
{
	if(document.getElementById(div_id) != null)
	{
		document.getElementById(div_id).innerHTML = my_str;
	}
}
//==============================================================================
//==============================================================================
function SendNewsMail(news_id, flag_archive)
{
	if(document.getElementById("from_mail") != null)
	{
		var from_mail = document.getElementById("from_mail").value;
		
		if(document.getElementById("to_mail") != null)
		{
			var to_mail = document.getElementById("to_mail").value;
			
			if(document.getElementById("subject") != null)
			{
				var subject = document.getElementById("subject").value;
				
				if(document.getElementById("content") != null)
				{
					var content = document.getElementById("content").value;
					
					xmlHttpSendMail = GetXmlHttpObject();
	
					if (xmlHttpSendMail == null)
					{
						alert("Browser does not support HTTP Request");
						return;
					}
					
					var url = 'objects/send_news_by_mail_ajax_inc.php?news_id='+news_id+'&flag_archive='+flag_archive+'&from_mail='+from_mail+'&to_mail='+to_mail+'&subject='+subject+'&content='+content+'&sid='+Math.random();
					
					xmlHttpSendMail.onreadystatechange = function()
					{
						if (xmlHttpSendMail.readyState==4 || xmlHttpSendMail.readyState=="complete")
						{
							if(xmlHttpSendMail.responseText == '1')
							{
								window.close();
							}
							else
							{
								alert(xmlHttpSendMail.responseText);
							}
						}
					}
					xmlHttpSendMail.open('GET', url, true);
					xmlHttpSendMail.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
					xmlHttpSendMail.send(null);
				}
				else
				{
					return;
				}
			}
			else
			{
				return;
			}
		}
		else
		{
			return;
		}
	}
	else
	{
		return;
	}
}
//==============================================================================
//==============================================================================
function SendContactInfo()
{
	if(document.getElementById("from_mail") != null)
	{
		var from_mail = document.getElementById("from_mail").value;
		
		if(document.getElementById("subject") != null)
		{
			var subject = document.getElementById("subject").value;
			
			if(document.getElementById("content") != null)
			{
				var content = document.getElementById("content").value;
				
				xmlHttpSendMailContact = GetXmlHttpObject();

				if (xmlHttpSendMailContact == null)
				{
					alert("Browser does not support HTTP Request");
					return;
				}
				
				var url = 'objects/send_contact_by_mail_ajax_inc.php?from_mail='+from_mail+'&subject='+subject+'&content='+content+'&sid='+Math.random();
				
				xmlHttpSendMailContact.onreadystatechange = function()
				{
					if (xmlHttpSendMailContact.readyState==4 || xmlHttpSendMailContact.readyState=="complete")
					{
						if(xmlHttpSendMailContact.responseText == '1')
						{
							document.form1.reset();
						}
						else
						{
							alert(xmlHttpSendMailContact.responseText);
						}
					}
				}
				xmlHttpSendMailContact.open('GET', url, true);
				xmlHttpSendMailContact.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				xmlHttpSendMailContact.send(null);
			}
			else
			{
				return;
			}
		}
		else
		{
			return;
		}
	}
	else
	{
		return;
	}
}
//==============================================================================
function GetSubCat(name_cat, name_sub_cat, name_sub_cat_div, name_result_div, sub_cat_id)
{
	if(document.getElementById(name_cat) == null)
		return;
	if(document.getElementById(name_sub_cat_div) == null)
		return;
	
	var object_category    = document.getElementById(name_cat);
	if(object_category.length <= 0)
	{
		return;
	}
	var object_category_id = object_category.options[object_category.selectedIndex].value;
	
	xmlHttpSubCat = GetXmlHttpObject();
	
	if (xmlHttpSubCat == null)
	{
		alert("Browser does not support HTTP Request");
		return;
	}
	
	var url = 'wizard/objects/sub_category_ajax_inc.php?category_id='+object_category_id+'&name_sub_category='+name_sub_cat+'&sub_category_id='+sub_cat_id+'&sid='+Math.random();
	
	xmlHttpSubCat.open('GET', url, true);
	xmlHttpSubCat.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlHttpSubCat.send(null);
	
	xmlHttpSubCat.onreadystatechange = function ()
	{
		if (xmlHttpSubCat.readyState==4 || xmlHttpSubCat.readyState=="complete")
		{
			if(document.getElementById(name_sub_cat_div) != null)
			{
				document.getElementById(name_sub_cat_div).innerHTML = xmlHttpSubCat.responseText;
				
				if(document.getElementById(name_sub_cat) != null)
				{
					var object_sub_cat    = document.getElementById(name_sub_cat);
					var object_sub_cat_id = object_sub_cat.options[object_sub_cat.selectedIndex].value;
			
					if(object_category_id <= 0)
					{
						if(document.getElementById(name_result_div) != null)
							document.getElementById(name_result_div).innerHTML = '';
					}
					else if(object_sub_cat_id <= 0)
					{
						for(var i = 0; i < object_sub_cat.length; i++)
						{
							if(i == 1)
							{
								object_sub_cat.options[i].selected = true;
								//OperationWizard('', '');
								break;
							}
						}
						/*if(document.getElementById(name_result_div) != null)
							document.getElementById(name_result_div).innerHTML = '';*/
					}
				}
			}
		}
	}
}
//==============================================================================
//==============================================================================
//==============================================================================
function OperationWizard(val, val1)
{
	/*checkForm = document.wizard;
	checkForm.operation_page.value = val;
	checkForm.operation.value = val1;
	checkForm.submit();*/
}
//==============================================================================
//==============================================================================
//==============================================================================
function OperationWizardAndChangeAction(val, val1, new_action)
{
	ChangeOnlyAction(new_action);
}
//==============================================================================
//==============================================================================
function GetSimpleSearch(div_id, url, param_name)
{
	if(document.getElementById(div_id) == null)
	{
		return;
	}
	
	var txt_search = document.getElementById(div_id).value;
	
	var toreplace1=/\"/g;
	var toreplace2=/\'/g;
	var toreplace3=/\\|\//g;
	
	txt_search = encodeURIComponent(txt_search);
	
	txt_search = txt_search.replace(toreplace1, "%22");
	txt_search = txt_search.replace(toreplace2, "");
	txt_search = txt_search.replace(toreplace3, "");
	
	var my_url = url+'?'+param_name+'='+txt_search;
	
	ChangeOnlyAction(my_url);
}
//==============================================================================
function GetSimpleSearchByEnter(event, div_id, url, param_name)
{
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	
	if(keyCode == 13)
	{
		GetSimpleSearch(div_id, url, param_name);
	}
}
//==============================================================================
//==============================================================================
//==============================================================================
function GetSearch(url)
{
	if(document.getElementById("text_search_1") == null)
	{
		return;
	}
	if(document.getElementById("news_classification_id") == null)
	{
		return;
	}
	if(document.getElementById("sub_category_id") == null)
	{
		return;
	}
	if(document.getElementById("category_id") == null)
	{
		return;
	}
	if(document.getElementById("fd") == null || document.getElementById("fm") == null || document.getElementById("fy") == null)
	{
		return;
	}
	if(document.getElementById("td") == null || document.getElementById("tm") == null || document.getElementById("ty") == null)
	{
		return;
	}
	
	var txt_search        = document.getElementById("text_search_1").value;
	var cat_id            = document.getElementById("category_id").value;
	var sub_cat_id        = document.getElementById("sub_category_id").value;
	var classification_id = document.getElementById("news_classification_id").value;
	var fd                = document.getElementById("fd").value;
	var fm                = document.getElementById("fm").value;
	var fy                = document.getElementById("fy").value;
	var td                = document.getElementById("td").value;
	var tm                = document.getElementById("tm").value;
	var ty                = document.getElementById("ty").value;
	
	var toreplace1=/\"/g;
	var toreplace2=/\'/g;
	var toreplace3=/\\|\//g;
	
	txt_search = encodeURIComponent(txt_search);
	
	txt_search = txt_search.replace(toreplace1, "%22");
	txt_search = txt_search.replace(toreplace2, "");
	txt_search = txt_search.replace(toreplace3, "");
	
	var my_url = url+'?txt_search='+txt_search+'&category_id='+cat_id+'&sub_category_id='+sub_cat_id+'&news_classification_id='+classification_id+'&fd='+fd+'&fm='+fm+'&fy='+fy+'&td='+td+'&tm='+tm+'&ty='+ty;
	
	ChangeOnlyAction(my_url);
}
//==============================================================================
function GetSearchByEnter(event, url)
{
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	
	if(keyCode == 13)
	{
		GetSearch(url);
	}
}
//==============================================================================
//==============================================================================
function RunCreateGallery()
{
	var div_id_prefix   = "GalleryOnlyOneImg_";
	var input_id_prefix = "ForGalleryNum_";
	
	if(document.getElementById("all_gallery_img") == null)
	{
		return;
	}
	
	var my_document = document.getElementById("all_gallery_img").getElementsByTagName("div");
	var my_current_id = 0;
	
	for(i = 0; i < my_document.length; i++)
	{
		var current_id = my_document.item(i).id;
		var temp       = current_id.split("_");
		
		if(temp.length == 2)
		{
			var new_div_id = div_id_prefix + temp[1];
			
			if(document.getElementById(new_div_id) != null)
			{
				if(document.getElementById(new_div_id).style.visibility == "visible")
				{
					my_current_id = temp[1];
					break;
				}
			}
		}
	}
	
	var input_id = input_id_prefix + my_current_id;
	
	if(document.getElementById(input_id) == null)
	{
		return;
	}
	else
	{
		var next_img_id = document.getElementById(input_id).value;
		
		ViewOneImgGallery(next_img_id);
	}
}
//==============================================================================
//==============================================================================
function CreateGallery(div_id, num)
{
	if(document.getElementById(div_id) == null)
	{
		return;
	}
	
	xmlHttpGallery = GetXmlHttpObject();
	
	if (xmlHttpGallery == null)
	{
		//alert("Browser does not support HTTP Request");
		return;
	}
	
	var url = 'objects/gallery_ajax_inc.php?num='+num+'&sid='+Math.random();
	
	xmlHttpGallery.onreadystatechange = function()
	{
		if (xmlHttpGallery.readyState==4 || xmlHttpGallery.readyState=="complete")
		{
			document.getElementById(div_id).innerHTML = xmlHttpGallery.responseText;
			
			if(xmlHttpGallery.responseText.length > 0)
			{
				ViewOneImgGallery(num);
			
				setInterval("RunCreateGallery('public_advertisement_4')", 15000);
			}
		}
	}
	xmlHttpGallery.open('GET', url, true);
	xmlHttpGallery.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlHttpGallery.send(null);
}
//==============================================================================
//==============================================================================
function ViewOneImgGallery(num)
{
	var div_id_prefix = "GalleryOnlyOneImg_";
	
	if(document.getElementById("all_gallery_img") == null)
	{
		return;
	}
	
	var my_document = document.getElementById("all_gallery_img").getElementsByTagName("div");
	
	for(i = 0; i < my_document.length; i++)
	{
		var current_id = my_document.item(i).id;
		var temp       = current_id.split("_");
		
		if(temp.length == 2)
		{
			var new_div_id = div_id_prefix + temp[1];
			
			if(document.getElementById(new_div_id) != null)
			{
				if(num == temp[1])
					document.getElementById(new_div_id).style.visibility = "visible";
				else
					document.getElementById(new_div_id).style.visibility = "hidden";
			}
		}
	}
}
//==============================================================================
//==============================================================================
//==============================================================================
//==============================================================================
function ChangeFontSize(id_font, font_size)
{
	if(document.getElementById(id_font) != null)
	{
		document.getElementById(id_font).style.fontSize = font_size+'px';
	}
}
//==============================================================================
//==============================================================================
function ChangeFontImg(br, current)
{
	var i = 1;
	
	for(i = 1; i <= br; i++)
	{
		var img_name       = 'font_'+i;
		var img_src_normal = 'images/change_font_size_'+i+'_normal.gif';
		var img_src_over   = 'images/change_font_size_'+i+'_over.gif';
		
		if(document.images[img_name] != null)
		{
			if(i == current)
				document.images[img_name].src=img_src_over;
			else
				document.images[img_name].src=img_src_normal;
		}
	}
}
//==============================================================================
//==============================================================================
var popy;
function PopUpOpen(theURL,winName,features)
{
	if(!window.focus)
		return true;

	if(popy!=null)
	{
		if(false == popy.closed)
		{
			popy.window.close();
		}
    }
	popy = window.open(theURL,winName,features);
	popy.focus();

    return false;
}
//==============================================================================
//==============================================================================
function OpenNewWin(url)
{
	var theURL   = url;
	var winName  = 'new_win';
	var features = 'width=650,height=450,status=no,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no';

	PopUpOpen(theURL,winName,features);
}
//==============================================================================
function HelpOpenNewWinImg(url, width, height)
{
	var dev_width  = '650';
	var dev_height = '450';
	
	var my_width;
	var my_height;
	
	if(width == null || width == 0)
		my_width = dev_width;
	else
		my_width = width;
		
	if(height == null || height == 0)
		my_height = dev_height;
	else
		my_height = height;
		
	var theURL   = url;
	var winName  = 'img_win';
	var features = 'width='+my_width+',height='+my_height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no';

	PopUpOpen(theURL,winName,features);
}
//==============================================================================
//==============================================================================
//==============================================================================
function CloseWindow()
{
	window.close();
}
//==============================================================================
//==============================================================================
function CheckWin()
{
	if(window.opener.closed)
	{
	    return false;
	}
	else
	{
		return true;
	}
}
//==============================================================================
//==============================================================================
//==============================================================================
//==============================================================================
//==============================================================================
function CreateBannersMiddle(prefix_div_id, div_id_start, div_id_end, num, view)
{
	var i = 0;
	
	for(i = div_id_start; i <= div_id_end; i++)
	{
		var div_id = prefix_div_id+i;
		
		if(document.getElementById(div_id) == null)
			return;
	}
	
	var current_div_id = prefix_div_id+view;
	
	xmlHttpViewRandBannerMiddle = GetXmlHttpObject();
				
	if (xmlHttpViewRandBannerMiddle == null)
	{
		alert("Browser does not support HTTP Request");
		return;
	}
	
	var url = 'objects/banner_ajax_inc.php?page_num='+num+'&position_view='+view+'&sid='+Math.random();
	
	xmlHttpViewRandBannerMiddle.open('GET', url, true);
	xmlHttpViewRandBannerMiddle.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlHttpViewRandBannerMiddle.send(null);
	
	xmlHttpViewRandBannerMiddle.onreadystatechange = function()
	{
		if (xmlHttpViewRandBannerMiddle.readyState==4 || xmlHttpViewRandBannerMiddle.readyState=="complete")
		{
			document.getElementById(current_div_id).innerHTML = xmlHttpViewRandBannerMiddle.responseText;
			
			if(div_id_end > view)
			{
			 	CreateBannersMiddle(prefix_div_id, div_id_start, div_id_end, num, (view+1));
			}
		}
	}
}
//==============================================================================
//==============================================================================
//==============================================================================
//==============================================================================
//==============================================================================
function BannerLink(my_url, my_target, banner_id)
{
	if(my_target == '_blank')
	{
		var theURL   = my_url;
		var winName  = 'banner_link';
		var features = '';
	
		PopUpOpen(theURL,winName,features);
	}
	else
	{
		location = my_url;
	}
	
	xmlHttpBannerStatistic = GetXmlHttpObject();
				
	if (xmlHttpBannerStatistic == null)
	{
		return;
	}
	
	var url = 'objects/banner_save_statistic_ajax_inc.php?banner_id='+banner_id+'&sid='+Math.random();
	
	xmlHttpBannerStatistic.open('GET', url, true);
	xmlHttpBannerStatistic.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlHttpBannerStatistic.send(null);
}
//==============================================================================
//==============================================================================
var currency_rate = new Array();
var currency_unit = new Array();
//==============================================================================
function CalculateCurrency()
{
	var id_field_sb_fc = "from_currency";
	var id_field_sb_tc = "to_currency";
	var id_field_in_fc = "from_unit";
	var id_field_in_tc = "to_unit";
	
	if(document.getElementById(id_field_sb_fc) == null || document.getElementById(id_field_sb_tc) == null || document.getElementById(id_field_in_fc) == null || document.getElementById(id_field_in_tc) == null)
		return;
		
	var code_from = document.getElementById(id_field_sb_fc).value;
	var code_to   = document.getElementById(id_field_sb_tc).value;
	var my_amount = document.getElementById(id_field_in_fc).value * 1;
	
	var currency_rate_from = currency_rate[code_from];
	var currency_unit_from = currency_unit[code_from];
	var currency_rate_to   = currency_rate[code_to];
	var currency_unit_to   = currency_unit[code_to];
	
	var res = my_amount*((currency_rate_from/currency_unit_from)/(currency_rate_to/currency_unit_to));
	
	document.getElementById(id_field_in_tc).value = Math.round(res *100)/100;
}
//==============================================================================
//==============================================================================
function CalculateCurrency1()
{
	var id_field_sb_fc = "MenuSbFromCode";
	var id_field_sb_tc = "MenuSbToCode";
	var id_field_in_fc = "from_unit1";
	var id_field_in_tc = "to_unit1";
	
	if(document.getElementById(id_field_sb_fc) == null || document.getElementById(id_field_sb_tc) == null || document.getElementById(id_field_in_fc) == null || document.getElementById(id_field_in_tc) == null)
		return;
		
	var code_from = document.getElementById(id_field_sb_fc).value;
	var code_to   = document.getElementById(id_field_sb_tc).value;
	var my_amount = document.getElementById(id_field_in_fc).value;
	
	var currency_rate_from = currency_rate[code_from];
	var currency_unit_from = currency_unit[code_from];
	var currency_rate_to   = currency_rate[code_to];
	var currency_unit_to   = currency_unit[code_to];
	
	var res = my_amount*((currency_rate_from/currency_unit_from)/(currency_rate_to/currency_unit_to));
	
	document.getElementById(id_field_in_tc).value = Math.round(res *100)/100;
}
//==============================================================================
//==============================================================================
function OnlyNumbers(fid, e)
{
	var key;
	var keychar;
	
	if (window.event)
	{
		key = window.event.keyCode;
	}
	else if (e)
	{
		key = e.which;
	}
	else
	{
		return true;
	}
	
	keychar = String.fromCharCode(key);
	// control keys
	if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27))
	{
		return true;
	// numbers
	}
	else if((("0123456789").indexOf(keychar) > -1))
	{	
		return true;
	}
	else if(keychar == ".")
	{
		var str = document.getElementById(fid).value;
		var temp_arr = str.split(keychar);
		
		if(temp_arr.length > 1)
		{
			return false;
		}
		else
		{
			return true;
		}
	}
	else
	{
		return false;
	}
}
//==============================================================================
//==============================================================================
function ControlMenuCurrency(menu_name, element_id, menu_name_hidden, menu_name_read, currency_code)
{
	if(document.getElementById(element_id) == null)
		return;
		
	if(document.getElementById(menu_name_read) != null)	
	{
		document.getElementById(menu_name_read).innerHTML = document.getElementById(element_id).innerHTML;
	}
	if(document.getElementById(menu_name_hidden) != null)	
	{
		document.getElementById(menu_name_hidden).value = currency_code;
	}
	if(document.getElementById(menu_name) != null)	
	{
		document.getElementById(menu_name).style.display = "none";
	}
}
//==============================================================================
function ViewOrHideMenuCurrency(menu_name)
{
	if(document.getElementById(menu_name) != null)	
	{
		if(document.getElementById(menu_name).style.display == "none")
		{
			document.getElementById(menu_name).style.display = "block";
		}
		else
		{
			document.getElementById(menu_name).style.display = "none";
		}
	}
}
//==============================================================================
//==============================================================================
function ChangeBackgroundColor(id, my_color)
{
	if(document.getElementById(id) != null)
	{
		document.getElementById(id).style.backgroundColor = my_color;
	}
}
//==============================================================================
//==============================================================================
function SwapImageSrc(img_name, img_src)
{
	if(document.images[img_name] != null)
	{
		document.images[img_name].src=img_src;
	}
}
//==============================================================================
//==============================================================================
function CreateSWFView(width, height, file_id, file_name)
{
	var str = '';
	
	str += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="'+file_id+'" align="middle">';
	str += '<param name="allowScriptAccess" value="sameDomain">';
	str += '<param name="movie" value="'+file_name+'">';
	str += '<param name="quality" value="high">';
	str += '<param name="wmode" value="transparent">';
	str += '<param name="bgcolor" value="#ffffff">';
	str += '<embed src="'+file_name+'" quality="high" wmode="transparent" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+file_id+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	str += '</object>';
	
	document.write(str);
}
//==============================================================================
//==============================================================================
function SS_swapImgRestore() { //v3.0
    var i,x,a=document.SS_sr;
    for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
        x.src=x.oSrc;
}

function SS_findObj(n, d) { //v4.01
    var p,i,x;
    if(!d) d=document;
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document;
        n=n.substring(0,p);}
    if(!(x=d[n])&&d.all)
        x=d.all[n];
    for (i=0;!x&&i<d.forms.length;i++)
        x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++)
        x=SS_findObj(n,d.layers[i].document);
    if(!x && d.getElementById)
        x=d.getElementById(n);
    return x;
}

function SS_swapImage() { //v3.0
    var i,j=0,x,a=SS_swapImage.arguments;
    document.SS_sr=new Array;
    for(i=0;i<(a.length-2);i+=3)
        if ((x=SS_findObj(a[i]))!=null) {
            document.SS_sr[j++]=x;
            if(!x.oSrc) x.oSrc=x.src;
            x.src=a[i+2];
        }
}

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

// onMouseOut="SS_swapImgRestore()"
// onMouseOver="SS_swapImage('Image14','','../images/AboutERCDown.jpg',1)"
//==============================================================================
//==============================================================================
