// JavaScript Document
function show(id)
{
	document.getElementById(id).style.display = "block"
}
function hide(id)
{
	document.getElementById(id).style.display = "none"
}
function fadein(id)
{
	id = "#" + id;
	$(id).fadeIn("slow");
}
function fadeout(id)
{
	id = "#" + id;
	$(id).fadeOut("slow");
}
function slidedown(id)
{
	id = "#" + id;
	$(id).slideDown("slow");
}
function slideup(id)
{
	id = "#" + id;
	$(id).slideUp("slow");
}
function showhide(id)
{
	if(document.getElementById(id).style.display == "none")
	{
		new slidedown(id);
	}
	else
	{
		new slideup(id);
	}
}
/*function simpleshowhide(id)
{
	if(document.getElementById(id).style.display == "none")
	{
		document.getElementById(id).style.display = "block"
	}
	else
	{
		document.getElementById(id).style.display = "none"
	}
}*/
function changeclass(id,classname)
{
	document.getElementById(id).className = classname;
}
function tree(nodeid,nodetitleid)
{
	if(document.getElementById(nodeid).style.display == "none")
	{
		new slidedown(nodeid);
		new changeclass(nodetitleid,'treenodecol')
	}
	else
	{
		new slideup(nodeid);
		new changeclass(nodetitleid,'treenodeex')
	}
}
function changeERopt()
{
	var currcountry = document.getElementById("fld_exch_rate_1").value
	switch(currcountry)
	{
		case "AUS-AUD":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;    
		case "AT-EUR":
			new slideup('rateopt');
			new slideup('rateoptus');
		break;
		case "BE-EUR":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;
		case "CAN-CAD":
			new slideup('rateopt');
			new slideup('rateoptus');
		break;
		case "EURO-EUR":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;
		case "FRA-EUR":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;
		case "GER-EUR":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;
		case "HK-HKD":
			new slideup('rateopt');
			new slideup('rateoptus');
		break;
		case "IE-EUR":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;
		case "ITL-EUR":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;
		case "JAP-JPY":
			new slideup('rateopt');
			new slideup('rateoptus');
		break;
		case "NL-EUR":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;
		case "PT-EUR":
			new slideup('rateopt');
			new slideup('rateoptus');
		break;
		case "SING-SGD":
			new slidedown('rateopt');
			new slideup('rateoptus');
		break;
		case "ES-EUR":
			new slideup('rateopt');
			new slideup('rateoptus');
		break;
		case "UAE-AED":
			new slideup('rateopt');	
			new slideup('rateoptus');
		break;
		case "UK-GBP":
			new slidedown('rateopt');	
			new slideup('rateoptus');
		break;
		case "US-USD":
			new slidedown('rateoptus');
			new slideup('rateopt');	
		break;
		default:
			new slideup('rateopt');
			new slideup('rateoptus');
	}
}
function setinnerthml(id,txt)
{
	document.getElementById(id).innerHTML = txt;
}
function deliveryloc(curralpha)
{
	var alphalist = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
	for(i=0;i<alphalist.length;i++)
	{
		if(alphalist[i] == curralpha)
		{
			new NA_evilpage('includes/deliveryloc-B.html','loclist','Loading Location list.........')
			document.getElementById(curralpha).className = "linkaplphaion";
		}
		else
		{
			document.getElementById(alphalist[i]).className = "linkaplpha";
		}
	}
	
}
function prgrmtabswitcher(currid)
{
	for(i=1; i<=3; i++)
	{
		var tabheadid = "tab" + i;
		var tabcontid = "tabcont" + i;
		if(Number(currid) == i)
		{
			document.getElementById(tabheadid).className = "on";
			new show(tabcontid);			
		}
		else
		{
			document.getElementById(tabheadid).className = "off";
			new hide(tabcontid);
		}
	}
}
function changecolor(id,colorcd)
{
	document.getElementById(id).style.backgroundColor = colorcd;
}
function subnavmenus(currid)
{
	for(i=1;i<=3;i++)
	{
		var linkid = "subnav_m" + i;
		var linkdiv = "subnav_d" + i;
		if(Number(currid) == i)
		{
			document.getElementById(linkid).className = "subnavmenu";
			new show(linkdiv);
		}
		else
		{
			document.getElementById(linkid).className = "pad_LR_10";
			new hide(linkdiv);			
		}
	}
}

function prgrmtabswitcher_4(currid)
{
	for(i=1; i<=4; i++)
	{
		var tabheadid = "tab" + i;
		var tabcontid = "tabcont" + i;
		if(Number(currid) == i)
		{
			document.getElementById(tabheadid).className = "on";
			new show(tabcontid);			
		}
		else
		{
			document.getElementById(tabheadid).className = "off";
			new hide(tabcontid);
		}
	}
}


function show_question(id)
{
	var plus
	var minus
	plus = id + "_plus"
	minus = id + "_minus"	
	document.getElementById(id).className = "textnormal"
	document.getElementById(plus).className = "hide"
	document.getElementById(minus).className = "hideshow"	
	
}

function hide_question(id)
{
	var plus
	var minus
	plus = id + "_plus"
	minus = id + "_minus"	
	document.getElementById(id).className = "hide"
	document.getElementById(plus).className = "hideshow"
	document.getElementById(minus).className = "hide"
	
}

function faqsAQ(currid)
{
	var total = 4;
	for(i=1;i<=total;i++)
	{
		var id = "faq" + i;
		if(i == Number(currid))
		{
			new slidedown(id);		
		}
		else
		{
			new slideup(id);
		}
	}
}

function bannerrotater(currid)
{
	var precont = "bannercont";
	var pretab = "bannertab";
	for(i=1;i<=4;i++)
	{
		var idtab = pretab + i;
		var idcont = precont + i;
		new hide(idcont);
		document.getElementById(idtab).className = "off";
	}
//	new pausefn(500);
	var idtab = pretab + currid;
	var idcont = precont + currid;
//	new fadein(idcont);
	new show(idcont);
	document.getElementById(idtab).className = "on";
}

function pausefn(millis)
{
	var date = new Date();
	var curDate = null;
	do 
	{ 
		curDate = new Date(); 
	}
	while(curDate-date < millis);
} 

function openclosesteps()
{
	if(document.getElementById("tipscontent").style.display == "none")
	{
		new slidedown("tipscontent");
		document.getElementById("tipslink").className = "link_sotipsup";
	}
	else
	{
		new slideup("tipscontent");
		document.getElementById("tipslink").className = "link_sotipsdown"
	}
}

/* Testimonials function starts here */
function flicktestimonials(currid)
{
	var total = 5;
	var precontid = "testi";
	var prelinkid = "testilink";
	var prephid = "testph";
	for(i=1;i<=Number(total);i++)
	{
		var contid = precontid + i;
		var linkid = prelinkid + i;
		var phid = prephid + i;
		if(i == Number(currid))
		{
			new show(contid);
			document.getElementById(phid).style.backgroundColor = "#ffffc3";
			//new elehide(headid);
		}
		else
		{
			new hide(contid);
			document.getElementById(phid).style.backgroundColor = "";			
			//new eleshow(headid);
		}
	}
}
/* Testimonials function ends here */

// JavaScript Document
function accordion(currid,total,pretab,precont,tabclson,tabclsoff)
{
	for(i=1;i<=Number(total);i++)
	{
		var id1 = pretab + i;
		var id2 = precont + i;
		if(i == currid)
		{
			document.getElementById(id1).className = tabclson;
			new slidedown(id2)
		}
		else
		{
			document.getElementById(id1).className = tabclsoff;
			new slideup(id2)
		}
	}
}
function accordion_compareus(currid)
{
	new accordion(currid,'4','acctab','acccont','fragconthead3on','fragconthead3')
}

/*For bookmark*/
function bookmark(url,title)
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
	{
		window.external.AddFavorite(url,title);
	}
	else if (navigator.appName == "Netscape")
	{
		window.sidebar.addPanel(title,url,"");
	} 
	else
	{
		alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
	}
}