function alertBox(msgArray, timeUpArg)
{
	//alert(timeUp);
	if(typeof timeUpArg == 'undefined' || "number" != (typeof timeUpArg))
	{	
		if (msgArray instanceof Array) 
		{	message = msgArray[0];	}
		else
		{	message = msgArray;		}
		
		var	timeUp = (message.length / 13)*1000;		
		if(timeUp < 1500)
		{	timeUp = 1500;	}
	}
	else
	{	timeUp = timeUpArg;	}
	
	var fadeTime = 1000; 
	
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupContact").height();
	var popupWidth = $("#popupContact").width();
	var obj = document.getElementById('notice');

	$("#popupContact").css({
		"position": "absolute",
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});	
	
	if (msgArray instanceof Array) 
	{
		if(1 == msgArray.length)
		{	popUp1(msgArray[0]);	}
		
		if(2 == msgArray.length)
		{	popUp2(msgArray[0], msgArray[1]);	}
	} 
	else if("string" == (typeof msgArray))
	{
		if("string" == (typeof timeUpArg))
		{	popUp2(msgArray, timeUpArg);	}
		else
		{	popUp1(msgArray);				}
	}

	function popUp2(message, title){
		obj.style.visibility="visible";
		
		$("#notice").text(title);		
		$("#contactArea").text(message);
		
		$("#popupContact").fadeIn(fadeTime,"linear");
		$("#popupContact").delay(timeUp).fadeOut(fadeTime,"linear");
	}		
	
	function popUp1(message){
		obj.style.visibility="hidden";	
		
		$("#notice").text('');
		$("#contactArea").text(message);
		
		$("#popupContact").fadeIn(fadeTime,"linear");
		$("#popupContact").delay(timeUp).fadeOut(fadeTime,"linear");		
	}	
}
