
function loadCalendarAds()
{
// all the ads data
var ads = new Array();

	var high_p = 0;
	var normal_p = 0;
	var low_p = 0;
	
	var h1 = -1;
	var h2 = -1;
	var n1 = -1; 
	var n2 = -1; 
	var l1 = -1; 
	var l2 = -1; 
	
	if (high_p >0)
	{
		while(h1>(high_p-1)||h1==-1)
		{
			h1 = Math.round( (high_p-1) * Math.random() );
		}
		
		if(high_p>1 )
		{
			while(h1==h2 || h2>(high_p-1) || h2==-1)
			{
				h2 = Math.round( (high_p-1) * Math.random() );
			}
		}
	}
	
	if (normal_p >0)
	{
		while (n1>(high_p+normal_p-1) || n1<=(high_p-1) || n1==-1)
		{
			n1 = Math.round( (high_p+normal_p-1) * Math.random() );
		}
		if(normal_p>1)
		{
			while(n1==n2 || n2>(high_p+normal_p-1) || n2<=(high_p-1)||n2==-1)
			{
				n2 = Math.round( (high_p+normal_p-1) * Math.random() );
			}
		}
	}
	
	if (low_p >0)
	{
		while (l1>(ads.length-1) || l1<=(ads.length-low_p-1) || l1==-1)
		{
			l1 = Math.round( (ads.length-1) * Math.random() );
		}
		if(low_p>1)
		{
			while(l1==l2 || l2>(ads.length-1) || l2<=(ads.length-low_p-1) || l2==-1)
			{
				l2 = Math.round( (ads.length-1) * Math.random() );
			}
		}
	}
	
	var strRightCol ="";
	
	var strLeftCol = "";
	
	if (h1>-1 && ads[h1][2].length>0)
	{
		strRightCol += ads[h1][2]+"<img src='" + ads[h1][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/></a>";
	}
	else if (h1>-1 && ads[h1][2].length==0)
	{
		strRightCol += "<img src='" + ads[h1][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/>";
	}
	
	if (n1>-1 && ads[n1][2].length>0)
	{
		strRightCol += ads[n1][2]+"<img src='" + ads[n1][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/></a>";
	}
	else if (n1>-1 && ads[n1][2].length==0)
	{
		strRightCol += "<img src='" + ads[n1][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/>";
	}
	
	if (l1>-1 && ads[l1][2].length>0)
	{
		strRightCol += ads[l1][2]+"<img src='" + ads[l1][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/></a>";
	}
	else if (l1>-1 && ads[l1][2].length==0)
	{
		strRightCol += "<img src='" + ads[l1][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/>";
	}
	
	if (h2>-1 && ads[h2][2].length>0)
	{
		strLeftCol += ads[h2][2]+"<img src='" + ads[h2][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/></a>";
	}
	else if (h2>-1 && ads[h2][2].length==0)
	{
		strLeftCol += "<img src='" + ads[h2][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/>";
	}
	
	if (n2>-1 && ads[n2][2].length>0)
	{
		strLeftCol += ads[n2][2]+"<img src='" + ads[n2][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/></a>";
	}
	else if (n2>-1 && ads[n2][2].length==0)
	{
		strLeftCol += "<img src='" + ads[n2][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/>";
	}
	
	if (l2>-1 && ads[l2][2].length>0)
	{
		strLeftCol += ads[l2][2]+"<img src='" + ads[l2][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/></a>";
	}
	else if (l2>-1 && ads[l2][2].length==0)
	{
		strLeftCol += "<img src='" + ads[l2][1] + "' width='120px' height='240px' style='border: 0; padding-bottom:10px;'/>";
	}
	
	document.getElementById('rightCol').innerHTML = strRightCol;
	document.getElementById('leftCol').innerHTML = strLeftCol;
}

