function newWin(url,w,h) // open new window
{
	window.open(url,'','width='+w+',height='+h+',top=150,left=200,scrollbars=yes,resizable=no').focus();
}

function show(elem,show) { // display | hide element
	var elems = document.getElementById(elem).style;
	elems.display = show ? "block" : "none";
}

function sml() { //email link
	var CStr = new Array(".","@","mai",":");
	var p1 = "eu";
	var p2 = "luxsoft";
	var p3 = "rb";
	document.write("<a href=\""+CStr[2]+"lto"+CStr[3]+p3+CStr[1]+p2+CStr[0]+p1+"\" title='email LuxSoft'>e"+CStr[2]+"l<\/a>");
}

//pop picture  on homepage

function loadPic (image, text) {
	var a = document.createElement('div');
	a.id = image.substring(image.lastIndexOf("/")+1);
	a.className= 'picbox';
	a.innerHTML = '<img src="'+image+'" /><br />'+text+'<br />';
	document.body.appendChild(a);
}

function oPic(imgid) {
	document.getElementById(imgid).style.display='block';
}

function xPic(imgid) {
	document.getElementById(imgid).style.display='none';
}

// dragme

var x,y,fobj=null;

function mousemove(e)
{
	var e = e || window.event; //nn6 || ie
  if (fobj)
  {
    fobj.style.left = x + e.clientX;
    fobj.style.top  = y + e.clientY ;
    return false;
  }
}

function mouseselect(e) 
{
	var e = e || window.event; //nn6 || ie
  fobj = e.target || event.srcElement; //nn6 || ie
  while (fobj.tagName != "HTML")
	{
		if (fobj.className.indexOf("dragme")>-1)
		{
			x = fobj.offsetLeft - e.clientX;
			y = fobj.offsetTop - e.clientY;
			document.onmousemove=mousemove;
			return false;
		} else { fobj = fobj.parentNode; }
	}
}
document.onmousedown=mouseselect;
document.onmouseup=new Function("fobj=null");
/*
$(document).ready(function() {
	if(document.all) {
		$('#Menu li.HasSubMenu').hover(function() {
			$(this).addClass('over');
			return false;
		},
		function() {
			$(this).removeClass('over');
		});
	}
});
*/
/**************************************************************************
 *                                                                        *
 *  JAVASCRIPT MENU HIGHLIGHTER v.1.5 (080929)                            *
 * --------------------------------------------                           *
 * ©2005 Media Division (www.MediaDivision.com)                           *
 *                                                                        *
 * Written by Marius Smarandoiu & Armand Niculescu                        *
 *                                                                        *
 * You are free to use, modify and distribute this file, but please keep  *
 * this header and credits                                                *
 *                                                                        *
 * Usage:                                                                 *
 * - the script will apply the .current class to the <a> and its parent   *
 *   <li> that is contained in the element with id="primarynav" and points*
 *   to the current URL                                                   *
 * - works in IE6, Firefox and Opera                                      *
 **************************************************************************/
function extractPageName(hrefString)
{
	var arr = hrefString.split('/');
	return  (arr.length<2) ? hrefString : arr[arr.length-2].toLowerCase() + arr[arr.length-1].toLowerCase();               
}

function setActiveMenu(arr, crtPage)
{
	for (var i=0; i<arr.length; i++)
	{
		if(extractPageName(arr[i].href) == crtPage)
		{
			if (arr[i].parentNode.tagName != "div")
			{
				arr[i].className = "current";
				arr[i].parentNode.className = "current";
			}
		}
	}
}

function setPage()
{
	hrefString = document.location.href ? document.location.href : document.location;

	if (document.getElementById("nav")!=null)
		setActiveMenu(document.getElementById("nav").getElementsByTagName("a"), extractPageName(hrefString));
}