/*************** products and details fadein fadeout starts********************/
function mousein(newid)
{

	var browser = navigator.appName ;
	for (i=1;i<=24;i++)
	{
		var imgid='img'+i;
		if(newid!=null)
		{
		    if(newid==imgid)
		    {
    		
			    if (browser == "Microsoft Internet Explorer")
			    {			    
			      if(document.getElementById(imgid)!=null && document.getElementById(imgid).filters.alpha!=null)		
			      {			     
			      document.getElementById(imgid).filters.alpha.opacity=100;			
			      }
			    }
			    else
			    {
			      if(document.getElementById(imgid)!=null)	
			      document.getElementById(imgid).style.opacity=1;			 
			    }
		    }
		}
	}
}
function mouseout(newid)
{
	var browser = navigator.appName ;
	for (i=1;i<=24;i++)
	{
		var imgid='img'+i;
		if(newid!=null)
		{
		    if(newid==imgid)
		    {
			     if (browser == "Microsoft Internet Explorer")
				    {
				    
				      if(document.getElementById(imgid)!=null && document.getElementById(imgid).filters.alpha!=null)	
				      document.getElementById(imgid).filters.alpha.opacity=60;
				    }
				    else
				    {
				         if(document.getElementById(imgid)!=null)	
				         document.getElementById(imgid).style.opacity=0.6;
				    }
		     }
		 }
	}
}

function bmousein(newid)
{
	var browser = navigator.appName ;
	for (i=1;i<=24;i++)
	{
		var imgid='img'+i;
		if(newid==imgid)
		{
			if (browser == "Microsoft Internet Explorer")
			{
			    if(document.getElementById(imgid)!=null && document.getElementById(imgid).filters.alpha!=null)	
			  document.getElementById(imgid).filters.alpha.opacity=100;
			}
			else
			{
			    if(document.getElementById(imgid)!=null)	
			  document.getElementById(imgid).style.opacity=1;
			}
		}
	}
}
function bmouseout(newid)
{
	var browser = navigator.appName ;
	for (i=1;i<=24;i++)
	{
		var imgid='img'+i;
		if(newid==imgid)
		{
			 if (browser == "Microsoft Internet Explorer")
				{
				    if(document.getElementById(imgid)!=null && document.getElementById(imgid).filters.alpha!=null)	
				  document.getElementById(imgid).filters.alpha.opacity=80;
				}
				else
				{
				    if(document.getElementById(imgid)!=null)	
				 document.getElementById(imgid).style.opacity=0.8;
				}
		 }
	}
}
/*************** products and details fadein fadeout ends********************/


/*************** Collections landing Mouseover starts***********************/
function returnObjPosition(target)
 {
    if(document.getElementById("get"+target)!=null)
	document.getElementById("get"+target).style.visibility="visible"
 }
 function hideDirQuickLook(target)
 {
    if(document.getElementById("get"+target)!=null)
    document.getElementById("get"+target).style.visibility="hidden";
 }
 /*************** Collections landing Mouseover ends***********************/
 
 
function change(pid)
{ 
switch(pid)
  {
    case '427':
	var gold = document.getElementById('l_427');
	if(gold!=null)	
	gold.style.color = "#971516";
	var vb1=document.getElementById("l_427");
	if(vb1!=null)			
    vb1.className="selected fnt-bold";
	break;	
	case '430':
	var diamond = document.getElementById('l_430');	
	if(diamond!=null)			
	diamond.style.color = "#971516";
	var vb1=document.getElementById("l_430");	
	if(vb1!=null)		
    vb1.className="selected fnt-bold";
	break;
	case '478':
	var platinum = document.getElementById('l_478');
	if(platinum!=null)				
	platinum.style.color = "#971516";
	var vb1=document.getElementById("l_478");
	if(vb1!=null)			
    vb1.className="selected fnt-bold";
	break;
	case '502':
	var silver = document.getElementById('l_502');	
	if(silver!=null)			
	silver.style.color = "#971516";
	var vb1=document.getElementById("l_502");	
	if(vb1!=null)		
    vb1.className="selected fnt-bold";
	break;
	case '583':
	var Antique = document.getElementById('l_583');	
	if(Antique!=null)			
	Antique.style.color = "#971516";
	var vb1=document.getElementById("l_583");	
	if(vb1!=null)		
    vb1.className="selected fnt-bold";
	break;
	case '424':
	var whatsnew = document.getElementById('l_592');
	    if(whatsnew!=null)				
	    {
	        whatsnew.style.color = "#971516";
	    }
	var jewelled=document.getElementById('l_2054');
	    if(jewelled!=null)
	    {
	        jewelled.style.color="#971516";
	    }
	    var vb1=document.getElementById("l_2054");
	    if(vb1!=null)			
	    {
            vb1.className="selected fnt-bold";
        }
        
	    var vb1=document.getElementById("l_592");
	    if(vb1!=null)			
	    {
            vb1.className="selected fnt-bold";
        }
	break;	
	case '580':
	var greatoffers = document.getElementById('l_580');	
	if(greatoffers!=null)			
	greatoffers.style.color = "#971516";
	var vb1=document.getElementById("l_580");
	if(vb1!=null)			
    vb1.className="selected fnt-bold";
	break;
	case '586':
	var precious = document.getElementById('l_586');	
	if(precious!=null)			
	precious.style.color = "#971516";
	var vb1=document.getElementById("l_586");
	if(vb1!=null)			
    vb1.className="selected fnt-bold";
	break;
		case '589':
	var thali = document.getElementById('l_589');
	if(thali!=null)				
	thali.style.color = "#971516";
	var vb1=document.getElementById("l_589");
	if(vb1!=null)			
    vb1.className="selected fnt-bold";
	break;
	case '644':
	var corporate = document.getElementById('l_644');
	if(corporate!=null)				
	corporate.style.color = "#971516";
	var vb1=document.getElementById("l_644");	
	if(vb1!=null)		
    vb1.className="selected fnt-bold";
	break;
	case '1340':
	var whatsnew1 = document.getElementById('l_1340');
	    if(whatsnew1!=null)				
	    {
	    whatsnew1.style.color = "#971516";
	    }
	var vb1=document.getElementById("l_1340");	
	    if(vb1!=null)		
	    {
            vb1.className="selected fnt-bold";
        }
	break;
	default:	
	break;
   }

}

function header(pid)
{ 
var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
var strTest = sPage;
var collect
if((strTest == 'gift-finder.aspx') || (strTest=='GiftfinderLanding.aspx'))
{
    collect = document.getElementById('gift-finder');	
    if(collect!=null)
	collect.style.color = "#971516";
}

else if(strTest == 'great-offers.aspx')
{
    collect = document.getElementById('great-offers');
    if(collect!=null)	
	collect.style.color = "#971516";
}
else if(strTest == 'whats-new.aspx')
{
    collect = document.getElementById('whatsnew');
    if(collect!=null)	
	collect.style.color = "#971516";
}
else if(strTest == 'great-offers.aspx')
{
    collect = document.getElementById('great-offers');
    if(collect!=null)	
	collect.style.color = "#971516";
}
  else if(strTest == 'grt-silversmith.aspx')
{
    collect = document.getElementById('grt-silversmith');
    if(collect!=null)	
	collect.style.color = "#971516";
}
  else if(strTest == 'divine-collections.aspx')
{
    collect = document.getElementById('divine-collections');
    if(collect!=null)	
	collect.style.color = "#971516";
}
else
{
    if(pid != '0')
    {        
        collect = document.getElementById('product');	
        if(collect!=null)
        collect.style.color = "#971516";
    }	
}

}
function guestname(name)
{
    if(document.getElementById("ulid")!=null)
        document.getElementById("ulid").innerHTML="";
    if(document.getElementById("logout")!=null)
        document.getElementById("logout").innerHTML="<ul class=\"fnt-12 white\"><li>Welcome " + name + " | " + "</li><li><a href=\"#\" title=\"Logout\" onclick=\"logoutnow()\">Logout</a></li></ul>"; 
}

function rollover(roll)
{
    if(document.getElementById(roll)!=null)
        document.getElementById(roll).style.textDecoration='underline';
}
function rollout(roll)
{
    if(document.getElementById(roll)!=null)
        document.getElementById(roll).style.textDecoration='none';
}

function ausdesc(id)
{
window.open('/app/auspiciousdesc.aspx?'+id,'popup','toolbar=0,location=0,width=480,height=300,scrollbars=1,resizable=0,left=300,top=300');
}

function loadbigimage(bigimage,alt)
{
document.getElementById("bigimage_add").src="";
document.getElementById("bigimage_add").src="/images/advertisements/big/"+bigimage;
document.getElementById("bigimage_add").alt=alt;
document.getElementById("bigimage_add").title=alt;
}

function viewcontact()
{
    window.open("/app/popup-contact.aspx","popup","toolbar=0,location=0,width=480,height=300,scrollbars=1,resizable=0,left=300,top=300");
}