function in_array(needle, haystack, strict) {
    var found = false, key, strict = !!strict;
 
    for (key in haystack) {
        if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) {
            found = true;
            break;
        }
    }
 
    return found;
}
function drawRound(ignoreSide,tag)
	{
		var type = "start";
		var HTML = '';
		var LAYERS = new Array("roundTop","roundBottom","roundLeft","roundRight","roundTopLeft","roundTopRight","roundBottomLeft","roundBottomRight");
		var matches = new Array();
		var sides2ignore = new Array();
		sides2ignore = ignoreSide.split(",");
		for(i=0;i<LAYERS.length;i++)
			{
				if(sides2ignore.length > 0)
					{
						for(j=0;j<sides2ignore.length;j++)
							{
								if(ignoreSide != "")
									{
										
									}
								if((LAYERS[i].match(sides2ignore[j]) != null) && (LAYERS[i].match(sides2ignore[j]) != ""))
									{
										//alert('IGNORING LAYER : '+ LAYERS[i]);
										matches[i] = true;
									}
								else
									{
										matches[i] = (matches[i] == true) ? true : false;
									}
							}

					}
			}
		var count = 0;
		for(i=0;i<LAYERS.length;i++)
			{
				if(matches[i] == false)
					{
								if(type == "end")
									{
										HTML += "</span>";
									}
								else
									{
										HTML += "<"+tag+" class='"+LAYERS[i]+"'>";
									}
							count++;
					}
			}
				if(type=="end")
					{
						HTML = "</span></span>" + HTML;
					}
				else
					{
						HTML = "<"+tag+" class='round'>" + HTML + "<"+tag+" class='roundContent'>";
						count++;count++;						
					}
		document.write(HTML);
		return count;
	}

function endDivs(no,tag)
	{
		var HTML = "";
		for(var i=0;i<no;i++)
			{
				HTML += "</div>";
			}
		document.write(HTML);
	}

