
function ShowImage(url, w, h)
{
	
	window.open(url, null, 'width='+w+',height='+h+',status=yes,toolbar=no,menubar=no,location=yes');
	//alert(win1.location);
}	

function ShowPrintPage(url)
{
	window.open(url, null);
}	

function CheckSelection()
{
	//alert('aaa');
}

function Trim(TRIM_VALUE)
{
	if(TRIM_VALUE.length < 1)
	{
		return"";
	}
	
	TRIM_VALUE = RTrim(TRIM_VALUE);
	TRIM_VALUE = LTrim(TRIM_VALUE);
	
	if(TRIM_VALUE=="")
	{
		return "";
	}
	else
	{
		return TRIM_VALUE;
	}
} //End Function

function RTrim(VALUE)
{
	var w_space = String.fromCharCode(32);
	var v_length = VALUE.length;
	var strTemp = "";
	if(v_length < 0){
	return"";
	}
	var iTemp = v_length -1;
	
	while(iTemp > -1){
	if(VALUE.charAt(iTemp) == w_space){
	}
	else{
	strTemp = VALUE.substring(0,iTemp +1);
	break;
	}
	iTemp = iTemp-1;
	
	} //End While
	return strTemp;
	
} //End Function
	
function LTrim(VALUE){
	var w_space = String.fromCharCode(32);
	if(v_length < 1){
	return"";
	}
	var v_length = VALUE.length;
	var strTemp = "";
	
	var iTemp = 0;
	
	while(iTemp < v_length){
	if(VALUE.charAt(iTemp) == w_space){
	}
	else{
	strTemp = VALUE.substring(iTemp,v_length);
	break;
	}
	iTemp = iTemp + 1;
	} //End While
	return strTemp;
} //End Function




if(document.images)
{
	img1 = new Image();
	img1.src = '/en/images/right_arrow.gif';
	img2 = new Image();
	img2.src = '/en/images/right_arrow_active.gif';
	img3 = new Image();
	img3.src = '/en/images/right_arrow_down.gif';
	img4 = new Image();
	img4.src = '/en/images/sub_arrow.gif';
	img5 = new Image();
	img5.src = '/images/1.gif';
	img6 = new Image();
	img6.src = '/en/images/bg_top_sub1.gif';
	img7 = new Image();
	img7.src = '/en/images/bg_top_sub2.gif';
	img8 = new Image();
	img8.src = '/en/images/bg_top_sub3.gif';
}

var monthLength = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

function checkDate(month, day, year)
{

	if(!day && !month && !year)
		return true;
	
	if (!day || !month || !year)
		return false;
	
	//alert(month+' '+day+' '+year);
		
	if (year/4 == parseInt(year/4))
		monthLength[1] = 29;

	if (day > monthLength[month-1])
		return false;

	monthLength[1] = 28;

	var now = new Date();
	now = now.getTime(); //NN3

	var dateToCheck = new Date();
	dateToCheck.setYear(year);
	dateToCheck.setMonth(month-1);
	dateToCheck.setDate(day);
	var checkDate = dateToCheck.getTime();

	var futureDate = (now < checkDate);
	var pastDate = (now > checkDate);
	
	return checkDate;
}


