function refresh()
{
	ChangeImage();
	setTimeout('refresh()',10000);
}
function ChangeImage()
{
	//alert(document.getElementById("tdId"));
	objTd = document.getElementById("tdId");
	nAds = ArrAdvImage.length;
	var randomNumber=Math.floor(Math.random()*nAds);
	//alert(objTd.style.background);
	objTd.style.background = "url(../index_images/"+ArrAdvImage[randomNumber]+") no-repeat right bottom;";

	//alert(objTd.style.background);
}

function open_window(msg,w,h)
{
        win = window.open("", "win", "width="+w+",height="+h+",screenX=3,left=3,screenY=3,top=3");
        win.focus();
        win.document.open("text/html");
        win.document.write("<HTML><HEAD><TITLE>Preview image</TITLE></HEAD><BODY onLoad='window.focus();' marginwidth=0 marginheight=0 topmargin=0 leftmargin=0  bgcolor=#ffffff>"+
        msg+"</BODY></HTML>");
        win.document.close();
}

// Coded by Travis Beckham
// http://www.squidfingers.com | http://www.podlob.com
// If want to use this code, feel free to do so, but please leave this message intact.
// --- version date: 06/02/03 ---------------------------------------------------------
// Node Functions
if(!window.Node){
	var Node = {ELEMENT_NODE : 1, TEXT_NODE : 3};
}
function checkNode(node, filter){
	return (filter == null || node.nodeType == Node[filter] || node.nodeName.toUpperCase() == filter.toUpperCase());
}
function getChildren(node, filter){
	var result = new Array();
	var children = node.childNodes;
	for(var i = 0; i < children.length; i++){
		if(checkNode(children[i], filter)) result[result.length] = children[i];
	}
	return result;
}
function getChildrenByElement(node){
	return getChildren(node, "ELEMENT_NODE");
}
function getFirstChild(node, filter){
	var child;
	var children = node.childNodes;
	for(var i = 0; i < children.length; i++){
		child = children[i];
		if(checkNode(child, filter)) return child;
	}
	return null;
}
function getFirstChildByText(node){
	return getFirstChild(node, "TEXT_NODE");
}
function getNextSibling(node, filter){
	for(var sibling = node.nextSibling; sibling != null; sibling = sibling.nextSibling){
		if(checkNode(sibling, filter)) return sibling;
	}
	return null;
}
function getNextSiblingByElement(node){
	return getNextSibling(node, "ELEMENT_NODE");
}

// Menu Functions & Properties

var activeMenu = null;

function showMenu(){
	if(activeMenu){
		activeMenu.className = "";
		getNextSiblingByElement(activeMenu).style.display = "none";
	}
	if(this == activeMenu){
		activeMenu = null;
	}else{
		this.className = "active";
		getNextSiblingByElement(this).style.display = "block";
		activeMenu = this;
	}
	return false;
}
function initMenu(){
	var menus, menu, text, a, i;
	menus = getChildrenByElement(document.getElementById("menu"));
	for(i = 0; i < menus.length; i++){
		menu = menus[i];
		text = getFirstChildByText(menu);
		if(text){
		a = document.createElement("a");
		menu.replaceChild(a, text);
		a.appendChild(text);
		a.href = "#";
		a.onclick = showMenu;
		a.onfocus = function(){this.blur()};
		if(active_item == i){
			a.className = "active";
			getNextSiblingByElement(a).style.display = "block";
			activeMenu = a;
		}
		}
	}
}

if(document.createElement) window.onload = initMenu;

// Added by Ivan!!!
// enter the integer from 0 to [items count] - 1 here and this item will be expanded
// (-1 if you do not want to expand it)



function SymError(){return true;}
window.onerror = SymError;

var highlightcolor="#FFD700"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj
//Regular expression to highlight only form\ elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/
//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else return false
}
//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}
var interval= eval("864000000");

