
function _Explain ( width , text ) {
	//change the width
	document.getElementById("explain").style.width = width + "px";
	document.getElementById("ExplainBody").innerHTML = text;	

	//show the explain
	document.getElementById("_explaindiv").style.visibility = "visible";	

	moveExplain();

}

function _HideExplain () {
	//show the explain
	document.getElementById("_explaindiv").style.visibility = "hidden";	

}

function moveExplain() {
	document.getElementById("_explaindiv").style.left = xMousePos;	
	document.getElementById("_explaindiv").style.top = yMousePos + 15 ;	
	setTimeout("moveExplain()" , 50);
}
function strReplace(s, r, w){
     return s.split(r).join(w);
}


function RollButton( butt ) {
	butt.src = strReplace(butt.src , "off_" , "on_");
}

function RestoreButton( butt ) {
	butt.src = strReplace(butt.src , "on_" , "off_");
}

function PreloadButt() {
	buttons = new Array(
					"images/bg.gif",
					"images/account/on_company.gif",
					"images/account/on_contact.gif",
					"images/account/on_open_source.gif",
					"images/account/on_our_clients.gif",
					"images/account/on_pricequote.gif",
					"images/account/on_products.gif",
					"images/account/on_services.gif",
					"images/account/on_showcase.gif",
					"images/account/on_home.gif",
					"images/account/off_company.gif",
					"images/account/off_contact.gif",
					"images/account/off_open_source.gif",
					"images/account/off_our_clients.gif",
					"images/account/off_pricequote.gif",
					"images/account/off_products.gif",
					"images/account/off_services.gif",
					"images/account/off_showcase.gif",
					"images/account/off_home.gif",
					"images/welcome/on_view_all.gif",
					"images/welcome/off_tech_ajax.gif",
					"images/welcome/off_tech_css.gif",
					"images/welcome/off_tech_flash.gif",
					"images/welcome/off_tech_java.gif",
					"images/welcome/off_tech_linux.gif",
					"images/welcome/off_tech_mysql.gif",
					"images/welcome/off_tech_php.gif",
					"images/welcome/off_tech_xhtml.gif",
					"images/welcome/on_tech_ajax.gif",
					"images/welcome/on_tech_css.gif",
					"images/welcome/on_tech_flash.gif",
					"images/welcome/on_tech_java.gif",
					"images/welcome/on_tech_linux.gif",
					"images/welcome/on_tech_mysql.gif",
					"images/welcome/on_tech_php.gif",
					"images/welcome/on_tech_xhtml.gif",
					"images/welcome/off_butt_login.gif",
					"images/welcome/on_butt_login.gif",
					"images/contact/off_reset.gif",
					"images/contact/off_send.gif",
					"images/contact/on_reset.gif",
					"images/contact/on_send.gif"					
				);
	var preload = new Array();

	for (i in buttons ){
		preload[i] = new Image();
		preload[i].src = "images/buttons/" + buttons[i] ;
	}
} PreloadButt();



_filluser = 0;
_fillpass = 0
function UnfillLogin(element) {
	if ((element.name == "user") && !_filluser) {
		_filluser = 1;
		element.value = "";
	} 
	
	if ((element.name == "pass") && !_fillpass) {
		_fillpass = 1;
		element.value = "";
	} 	
}

function FillLogin(element) {
		if ((element.name == "user") && (element.value=="")){
			_filluser = 0;
			element.value = "Username";
		}

		if ((element.name == "pass") && (element.value=="")){
			_fillpass = 0;
			element.value = "password";
		}

}


function OpenMailClient () {
		window.location = "mailto:" + "o" + "f" + "f" + "i" + "c" + "e" + "@o" + "xyl" + "us." + "ro";
}