/* ---------------------------------------- Common ---------------------------------------- */
function getbyid( sId )
{
	return document.getElementById( sId );
}

function scr( p_sURL )
{
	window.open( p_sURL, '_blank', 'channelmode=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, top=0, left=0, width=' + (screen.availWidth-16) + ', height=' + (screen.availHeight-32));	
}

function search()
{    
    var sSearchTbx = getbyid("searchQuery");
    window.location = "SearchResults.aspx" + "?query=" + sSearchTbx.value;    
}
/* ---------------------------------------- end of Common ---------------------------------------- */





/* ---------------------------------------- Menu ---------------------------------------- */
function hideSubs()
{
	oChild = getbyid("submenus").firstChild;
	while ( oChild != getbyid("submenus").lastChild )
	{
		if(oChild.nodeType == 1)
		{
			oChild.style.display = "none";
		}
		oChild = oChild.nextSibling;
	}
	oChild = getbyid("submenus").lastChild;
	if(oChild.nodeType == 1)
		getbyid("submenus").lastChild.style.display = "none";
}



function homeRollOver()
{
    if (document.title.lastIndexOf("| News |") == -1)	    
	    getbyid("tl").style.background = "url(i/menu_top_left_hover.gif)";
	else 
	    getbyid("tl").style.background = "url(../i/menu_top_left_hover.gif)";
	    
	getbyid("homelink").className = "a_hover";
	hideSubs();
}

function homeRollOut()
{
    if (document.title.lastIndexOf("| News |") == -1)
        getbyid("tl").style.background = "url(i/menu_top_left.gif)";
    else    
	    getbyid("tl").style.background = "url(../i/menu_top_left.gif)";
	    
	getbyid("homelink").className = "";
}



function productsRollOver()
{
	hideSubs();
	getbyid("products_sub").style.display = "";
}

function partnersRollOver()
{
	hideSubs();
	getbyid("partners_sub").style.display = "";
}

function aboutRollOver()
{
	hideSubs();
	getbyid("about_sub").style.display = "";
}

function newsRollOver()
{
	hideSubs();
	//getbyid("news_sub").style.display = "";
}

function supportRollOver()
{
	hideSubs();
	//getbyid("news_sub").style.display = "";
}
/* ---------------------------------------- end of Menu ---------------------------------------- */





/* ---------------------------------------- Gold Partnership autochange ---------------------------------------- */
function pasteGoldPartner()
{/*
	var oPartenrshipDate = new Date ( "June 29, 2008 0:0:0" );
	
	var oNow = new Date();	
	if( oNow > oPartenrshipDate )
	{
	    if (document.title.lastIndexOf("| News |") == -1)
	    {
		    document.getElementById( "logotypesTd" ).style.backgroundImage = "url(i/logo_dynamics_crm_gold.gif)";
		    document.getElementById( "logotypesTd" ).firstChild.style.backgroundImage = "url(i/logo_dynamics_crm_screenshot_gold.gif)";
		}
		else
		{
		    document.getElementById( "logotypesTd" ).style.backgroundImage = "url(../i/logo_dynamics_crm_gold.gif)";
		    document.getElementById( "logotypesTd" ).firstChild.style.backgroundImage = "url(../i/logo_dynamics_crm_screenshot_gold.gif)";
		}
	}	*/
}
/* ---------------------------------------- end of Gold Partnership autochange ---------------------------------------- */
