// JavaScript Document
function Out_advlink () {
	var strout = "";
	strout += "<td>";
	if (this.linksite != null) {
		strout += "<a href=\"" + this.linksite + "\"";
		if (this.target != null) strout += " target=\"" + this.target + "\"";
		strout += " />"
	}
	strout += "<img src=\"" + this.image + "\" border=\"0\" width=\"" + this.width + "\" height=\"" + this.height + "\" />";
	if (this.linksite != null) strout += "</a>";
	strout += "</td>";
	return strout;
}
function advlink(position, image, width, height, linksite, target) {
	this.position = position;
	this.image = image;
	this.width = width;
	this.height = height;
	this.linksite = linksite;
	this.target = target;
	this.Out_advlink = Out_advlink;
}
function Out_Array_Orient (alink, position, columns) {
	var strout = "";
	var ilenght;
	var indexcol = 0;
	var i = 0;
	ilength = alink.length;
	strout += "<table align=\"center\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">";
	for (i=0; i<ilength; i++) {
		if (indexcol==0) strout += "<tr>";
		/*strout += "<td>";
		if (alink[i][3] != null) {
			strout += "<a href=\"" + alink[i][3] + "\"";
			if (alink[i][4] != null) strout += " target=\"" + alink[i][4] + "\">";
		}
		strout += "<img src=\"" + alink[i][0] + "\" border=\"0\" width=\"" + alink[i][1] + "\" height=\"" + alink[i][2] + "\" />";
		if (alink[i][3] != null) strout += "</a>";
		strout += "</td>";*/
		if (alink[i].position == position) {
			strout += alink[i].Out_advlink();
			indexcol += 1;
		}
		
		if (indexcol == columns) {
			strout += "</tr>";
			indexcol = 0;
		}
	}
	if (indexcol > 0) {
		for (; indexcol < columns; indexcol++) {
			strout += "<td> </td>";
		}
		strout += "</tr>";
	}
	strout += "</table>";
	return strout;
}
