function gpopup( mylink, windowname )
{
        if ( !window.focus )
                return true;

        var href;
        if ( typeof( mylink ) == "string" )
                href = mylink;
        else
                href = mylink.href;
        window.open( href, windowname, "width=450,height=600,scrollbars=no" ).focus();
        return false;
}

// Opens a popup window
function popup(url, width, height, scroll)
{
  window.open(url,"no_name","width=" + width + ",height=" + height + ",top=100,left=100,status=no,toolbar=no,menubar=no,location=no,scrollbars=" + scroll);
}

// mouseover pe steagurile de limba

function RestoreImage(){ 
	nCount = document.OriginImage.length;
	ImgArray = document.OriginImage;

	if (document.OriginImage != null)
		for (i = 0; i < (nCount - 1); i += 2)
			ImgArray[i].src = ImgArray[i+1];
	document.OriginImage = null;
}

function ReplaceImage(){ 
	j = 0;
	ImgArray = new Array;
	oldImgArray = document.OriginImage;

	for (i = 0; i < ReplaceImage.arguments.length; i += 2) {
		obj=ReplaceImage.arguments[i]
		ImgArray[j++] = obj;
		if (oldImgArray == null || oldImgArray[j-1] != obj)
			ImgArray[j++] = obj.src;
		else
			ImgArray[j++] = oldImgArray[j];
		obj.src = ReplaceImage.arguments[i + 1];
	}
	if (document.OriginImage == null)
		document.OriginImage = ImgArray;
}

// mouseover pe celula

function mOvr(src) {
	if (!src.contains(event.fromElement))
		{src.style.cursor = 'hand';
		 src.bgColor = '#d7d7d7';
	}
}
function mOut(src) {
	if (!src.contains(event.toElement))
		{src.style.cursor = 'default';
		 src.bgColor = '#ebebeb';
	}
}
function mClk(src) {
	if(event.srcElement.tagName=='TD')
	{src.children.tags('A')[0].click();
	}
}

function mOvr1(src) {
	if (!src.contains(event.fromElement))
		{src.style.cursor = 'hand';
		 src.bgColor = '#b8b8b8';
	}
}
function mOut1(src) {
	if (!src.contains(event.toElement))
		{src.style.cursor = 'default';
		 src.bgColor = '#d7d7d7';
	}
}
function mClk1(src) {
	if(event.srcElement.tagName=='TD')
	{src.children.tags('A')[0].click();
	}
}