//data transformation function

function transform(x, y)
{
	var input, temp1 = "", i;
	input = x.value;
	for( i = 0; i <= input.length; i++)
	{
		if( input.charAt( i ) == "'" )
			temp1 += "^";
		else				
			temp1 += input.charAt( i );
	}
	y.value = temp1;
}

function transformUP(x, y)
{
	var input, temp1 = "", i;
	input = x.value;
	for( i = 0; i <= input.length; i++)
	{
		if( input.charAt( i ) == "'" )
			temp1 += "*";
		else				
			temp1 += input.charAt( i );
	}
	y.value = temp1;
}

function DBtransform(x, y)
{
	var input, temp1 = "", i;
	input = x;
	
	for( i = 0; i <= input.length; i++)
	{
		if( input.charAt( i ) == "^" )
			temp1 += "'";
		else				
			temp1 += input.charAt( i );
	}
	
	y.value = temp1;
}	

function change(x)
{	
	var input, temp1 = "", i;
	input = x;
	
	for( i = 0; i <= input.length; i++)
	{
		if( input.charAt( i ) == "^" )
			temp1 += "'";
		else				
			temp1 += input.charAt( i );
	}
		
	x = temp1;
	return x;
}

function changeUP(x)
{			
	var input, temp1 = "", i;
	input = x;
	
	for( i = 0; i <= input.length; i++)
	{
		if( input.charAt( i ) == "*" )
			temp1 += "'";
		else				
			temp1 += input.charAt( i );
	}
		
	x = temp1;
	return x;
}

function changeDT(x)
{
	var input = x;
	var temp1 = "", temp2 = "", i, j;
	var mon;
	
	for( i = 0; i <= input.length; i++)
	{
		if( input.charAt( i ) == "," )
		break;		
	}
	i = i + 2;
	for( j = i; j <= input.length; j++)
	{
		temp1 += input.charAt( j );		
	}
	
	for( i = 0; i < temp1.length; i++ )
	{
		if( temp1.charAt( i ) == " " )
		break;	
	}
	
	mon = temp1.slice(0,i);
	
	if( mon == 'January' )
		mon = "Jan";
	else if( mon == 'February' )
		mon = "Feb";
	else if( mon == 'March' )
		mon = "Mar";
	else if( mon == 'April' )
		mon = "Apr";
	else if( mon == 'June' )
		mon = "Jun";
	else if( mon == 'July' )
		mon = "Jul";
	else if( mon == 'August' )
		mon = "Aug";
	else if( mon == 'September' )
		mon = "Sep";
	else if( mon == 'October' )
		mon = "Oct";
	else if( mon == 'November' )
		mon = "Nov";
	else if( mon == 'December' )
		mon = "Dec";
	
	for( j = i; j <= temp1.length; j++)
	{			
		temp2 += temp1.charAt( j );		
	}	
	temp2 = mon + temp2;
	
	x = temp2;
	return x;
}