
function mouseover()
{
document.getElementById("Img_Back").src="/global/assets/images/center-contents/back_to_where_we_operate_over.gif";
}
function mouseout()
{
document.getElementById("Img_Back").src="/global/assets/images/center-contents/back_to_where_we_operate.gif";
} 



function onvisitmouseover()
{
document.getElementById("img_l").src=VirtualDir+"/assets/images/center-contents/right_over.gif";
document.getElementById("div_c").style.backgroundImage="url("+VirtualDir+"/assets/images/center-contents/r_over.gif)";
document.getElementById("img_r").src=VirtualDir+"/assets/images/center-contents/left_over.gif";
}
function onvisitmouseout()
{
document.getElementById("img_l").src=VirtualDir+"/assets/images/center-contents/right.gif";
document.getElementById("div_c").style.backgroundImage="url("+VirtualDir+"/assets/images/center-contents/r.gif)";
document.getElementById("img_r").src=VirtualDir+"/assets/images/center-contents/left.gif";
}

window.onload= setUpPageMargin;
window.onload= positionBrandsPanel;
window.onload= positionHomePanel;

function setUpPageMargin()
{
    if(document.getElementById("div_horizontalbanners"))
    {   
        var divName=document.getElementById("div_horizontalbanners")
        var h5Value=divName.getElementsByTagName('h5');        
        for(i=0;i<h5Value.length;i++)
        {
            if(h5Value[i].innerHTML=="")
            {
                h5Value[i].style.display="none";                
            }
        }
        
    }
if(document.getElementById("div_verticalbanners"))
    {   
        var divName=document.getElementById("div_verticalbanners")
        var h5Value=divName.getElementsByTagName('h5');      
        for(i=0;i<h5Value.length;i++)
        {
            if(h5Value[i].innerHTML=="")
            {
                h5Value[i].style.display="none";                
            }
        }
        
    }
}
function panelButtonRollover(left_id, left_img, middle_id, middle_img, right_id, right_img)
{		
//alert(	"left_id: " + left_img);
document.getElementById(left_id).src = left_img;
	document.getElementById(middle_id).style.backgroundImage = "url(" + middle_img + ")";
	document.getElementById(right_id).src = right_img;	
}	

jQuery.noConflict();

/*jQuery(document).ready(function () {
	var roundTop = {tl: { radius: 16}, 
					tr: { radius: 16},
					bl: false, 
					br: false, 
					antiAlias: true, 
					autoPad: false};
					
	var roundBottom = {	tl: false, 
						tr: false, 
						bl: { radius: 16}, 
						br: { radius: 16}, 
						antiAlias: true, 
						autoPad: false};
						
	var round =	{	tl: { radius: 8}, 
					tr: { radius: 8},
					bl: { radius: 8}, 
					br: { radius: 8}, 
					antiAlias: true, 
					autoPad: false};
	
	var cornersObj; 
	cornersObj = new curvyCorners(roundTop, "roundTop");
	cornersObj.applyCornersToAll();
	cornersObj = new curvyCorners(roundBottom, "roundBottom");
	cornersObj.applyCornersToAll();
	cornersObj = new curvyCorners(round, "secondaryInnerPanel");
	cornersObj.applyCornersToAll();			
});*/

function SearchUrl(searchpath)
{

window.location.href = searchpath+document.getElementById('q').value;
}

var aryClassElements = new Array();
function positionBrandsPanel() 
{

    aryClassElements.length = 0;
    getElementsByClassName( 'div_individualbrand_wrapper', document.body );
    count=aryClassElements.length;
    var i=1;
		 for (  ; i < count;  )
		    {			
			i=i+2;			
     		   	if(i<=count)
			{
	     		   	aryClassElements[i-1].className = 'div_individualbrand_wrapper clearleft';
			
			}
		    }   	
  
}
function positionHomePanel() 
{

    aryClassElements.length = 0;
    getElementsByClassName( 'div_content_secondbg', document.body );
    count=aryClassElements.length;
    var i=1;
		 for (  ; i < count;  )
		    {			
			i=i+3;			
     		   	if(i<=count)
			{
	     		   	aryClassElements[i-1].className = 'div_content_secondbg clearleft';
			
			}
		    }   	
  
}

function getElementsByClassName( strClassName, obj ) {
    if ( obj.className == strClassName ) {
        aryClassElements[aryClassElements.length] = obj;
    }
    for ( var i = 0; i < obj.childNodes.length; i++ )
        getElementsByClassName( strClassName, obj.childNodes[i] );
}

function onJobbuttonmouseover(id)
{
document.getElementById("div_left_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/left_green_over.gif)";
document.getElementById("div_jobbtncenter_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/r_green_over.gif)";
document.getElementById("div_right_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/right_green_over.gif)";
}
function onJobbuttonmouseout(id)
{
document.getElementById("div_left_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/left_green.gif)";
document.getElementById("div_jobbtncenter_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/r_green.gif)";
document.getElementById("div_right_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/right_green.gif)";
}
function onJobApplyButtonMouseover(id)
{
document.getElementById("div_applyleft_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/left_green_over.gif)";
document.getElementById("div_applycenter_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/r_green_over.gif)";
document.getElementById("div_applyright_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/right_green_over.gif)";
}
function onJobApplyButtonMouseout(id)
{
document.getElementById("div_applyleft_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/left_green.gif)";
document.getElementById("div_applycenter_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/r_green.gif)";
document.getElementById("div_applyright_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/right_green.gif)";
}
function onJobRefineButtonMouseover(id)
{
document.getElementById("img_refine_"+id).src=VirtualDir+"/assets/images/refine_your_search_over.gif";
}
function onJobRefineButtonMouseout(id)
{
document.getElementById("img_refine_"+id).src=VirtualDir+"/assets/images/refine_your_search.gif";
}


function onJobBackButtonMouseover()
{
document.getElementById("img_backrefine").src=VirtualDir+"/assets/images/backto_jobsearch_over.gif";
}
function onJobBackButtonMouseout()
{
document.getElementById("img_backrefine").src=VirtualDir+"/assets/images/backto_jobsearch.gif";
}

function onJobdetailbuttonmouseover(id)
{

document.getElementById("div_job_left_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/left_green_over.gif)";
document.getElementById("div_job_center_"+id).style.background="url("+VirtualDir+"/assets/images/r_green_over.gif) repeat scroll top";
document.getElementById("div_job_right_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/right_green_over.gif)";
}
function onJobdetailbuttonmouseout(id)
{

document.getElementById("div_job_left_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/left_green.gif)";
document.getElementById("div_job_center_"+id).style.background="url("+VirtualDir+"/assets/images/r_green.gif) repeat scroll top";
document.getElementById("div_job_right_"+id).style.backgroundImage="url("+VirtualDir+"/assets/images/right_green.gif)";
}



function CallPrint( strid )
{
 var prtContent = document.getElementById(strid);
 var WinPrint = window.open();
          WinPrint.document.write( '<html><head><title>Mars.com - Job detail print</title><link rel="stylesheet" type="text/css" href="'+VirtualDir+'/assets/css/JobPrint.css" /></head>' + prtContent.innerHTML + '</body></html>' );
        WinPrint.document.close();
        WinPrint.print();
    }

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}
