//Country List for Country drop down
var offcolor = "#FFFFFF";
var oncolor = "#FFFFDF";
function fadein(id)
{
	id = "#" + id;
	$(id).fadeIn("medium");
}
function fadeout(id)
{
	id = "#" + id;
	$(id).fadeOut("medium");
}
function slidedown(id)
{
	id = "#" + id;
	$(id).slideDown("medium");
}
function slideup(id)
{
	id = "#" + id;
	$(id).slideUp("medium");
}

function validateregfrm()
{
	var flag = 0;
	if(document.getElementById("field_1").value == "")
	{
		flag = 1;
		new hideerrmsg('field_1_box','field_1_box_errbx');
		new adderrmsg('field_1_box','Please enter your Sending Country');
	}
	else
	{
		
	}
	
	if(flag==1)
	{
		return false;
	}
	else
	{
		return true;
	}
}
function setsuboptn()
{
	new slidedown('typesubopt');
	new slidedown('typesuboptlabel');
	document.getElementById('field_7').length = 0;
	var selectedtype = document.getElementById("field_6").value 
	var subtype = document.getElementById("field_7");
	if(selectedtype == "null")
	{
		new slideup('typesubopt');
		new slideup('typesuboptlabel');		
	}
	if(selectedtype == "Account Related")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Login/Password","Login/Password")
		subtype.options[2]=new Option("A/C Activation","A/C Activation")
		subtype.options[3]=new Option("Registration Related","Registration Related")
		subtype.options[4]=new Option("Others","Others")
	}
	if(selectedtype == "Cancellation - Transaction")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Cancel Transaction","Cancel Transaction")
		subtype.options[2]=new Option("Others","Others")
	}
	if(selectedtype == "Compliance")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Additional Document","Additional Document")
		subtype.options[2]=new Option("Tele-Verification","Tele-Verification")
		subtype.options[3]=new Option("KYC Verification","KYC Verification")
		subtype.options[4]=new Option("Others","Others")
	}
	if(selectedtype == "Foreign Exchange")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Rate applied","Rate applied")
		subtype.options[2]=new Option("Others","Others")
	}
	if(selectedtype == "General")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Payment Modes","Payment Modes")
		subtype.options[2]=new Option("Modes Of credit","Modes Of credit")
		subtype.options[3]=new Option("Process","Process")
		subtype.options[4]=new Option("Others","Others")
	}
	if(selectedtype == "Others")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Services","Services")
		subtype.options[2]=new Option("Techincal","Techincal")
		subtype.options[3]=new Option("Others","Others")
	}
	if(selectedtype == "Product")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Process","Process")
		subtype.options[2]=new Option("Standing Instruction Facility","Standing Instruction Facility")
		subtype.options[3]=new Option("Utility Bill Payment","Utility Bill Payment")
		subtype.options[4]=new Option("Turn Around Time (TAT)","Turn Around Time (TAT)")
		subtype.options[5]=new Option("Currency","Currency")		
		subtype.options[6]=new Option("Others","Others")
	}
	if(selectedtype == "Promotion/Offer")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Registration Offer","Registration Offer")
		subtype.options[2]=new Option("Transaction Offer","Transaction Offer")
		subtype.options[3]=new Option("Delivery","Delivery")
		subtype.options[4]=new Option("Others","Others")
	}
	if(selectedtype == "Service Charges/Fee")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Charges","Charges")
		subtype.options[2]=new Option("More amount deducted","More amount deducted")
		subtype.options[3]=new Option("Others","Others")
	}
	if(selectedtype == "Transaction Related")
	{
		subtype.options[0]=new Option("Select","null")
		subtype.options[1]=new Option("Transaction Concern","Transaction Concern")
		subtype.options[2]=new Option("Status Tracker","Status Tracker")
		subtype.options[3]=new Option("Transaction Closed","Transaction Closed")
		subtype.options[4]=new Option("DD issue","DD issue")
		subtype.options[5]=new Option("Others","Others")
	}
	
}
function setfocus(fieldid)
{
	var obj = document.getElementById(fieldid);
	obj.focus();
	try
	{
		obj.select();	
	}
	catch(e)
	{
	}
}
function changeclass(id,class1)
{
	document.getElementById(id).className = class1;
}
function changetxtbxbrdr(id,onoff)
{
	if(onoff == "on")
	{
		document.getElementById(id).style.border = "#666666 solid 1px";
	}
	else
	{
		document.getElementById(id).style.border = "#cccccc solid 1px";		
	}
}

function ele_hide(id)
{
	document.getElementById(id).style.display = "none"
}
function ele_show(id)
{
	document.getElementById(id).style.display = "block"
}
function changeBG(id,onoff)
{
	var obj = document.getElementById(id);
	if(onoff == "on")
	{
		obj.style.backgroundColor = oncolor;
	}
	else
	{
		obj.style.backgroundColor = offcolor;		
	}
}



