var UserLanguage, CurrentUserID, Time;

/*
This page was written by Effy Teva for SmartPortal.NET usage only!
Copy of this code or part of it is ILLEGAL.
If you want to use any part of this code, you MUST contact Effy Teva at effy@donkey.co.il.
Any website using parts of this code may be forced to remove it!

All rights reserved (r) to Effy Teva (2006) - SmartPortal.NET v1.0
*/

function SubmitAsForm(NameValues)
{
	var S = new Array();
	S = NameValues.split(/[&=]/);
	A = "<form name=\"ABCDEF\" method=\"post\">";
	for (var i = 0; i < S.length; i++)
		A += "<input type=\"hidden\" name=\"" + S[i] + "\" value=\"" + S[++i] + "\">";
	A += "</form>";
	document.body.innerHTML += A;
	document.forms["ABCDEF"].submit();
}

function ShowHide(ID)
{
	var Object = document.getElementById(ID);
	Object.style.display = Object.style.display == "none" ? "" : "none";
}

function ChangeDir(ID)
{
	var Object = document.getElementById(ID);
	Object.dir = Object.dir == "ltr" ? "rtl" : "ltr";
}

function setCookie(name, value, expires, path) 
{
	document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + "; path=/";
}

function getCookie(name) 
{
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) 
	{
		begin = dc.indexOf(prefix);
		if (begin != 0) 
			return null;
	} 
	else
		begin += 2;
	var end = document.cookie.indexOf(";", begin);
	if (end == -1)
	    end = dc.length;
	return unescape(dc.substring(begin + prefix.length, end));
}


function AddToFavorites()
{
	window.external.AddFavorite("http://www.donkey.co.il", "donkey.co.il")
}

function SetAsHomePage()
{
    document.write ("<a id=\"HomePageVButton\" onClick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.donkey.co.il');history.go(0)\"><script>document.location=document.location</script>return to <a href='http://www.donkey.co.il'>http://www.donkey.co.il</a></a>");
    document.getElementById("HomePageVButton").click();
}

function OpenFullSizeWindow(URL)
{
	GenerateFullSizeWindow(URL);
}

function GenerateFullSizeWindow(URL)
{
	return window.open(URL, "", "resizable,fullscreen=yes");
}

function OpenSmallWindow(URL)
{
	if (URL.charAt(0) != "/" && URL.indexOf("http://") != 0)
	    GenerateSmallWindow("/" + URL);
	else
	    GenerateSmallWindow(URL);
}

function GenerateSmallWindow(URL)
{
	var Width = 350;
	var Height = 275;
	
	var xMax = 640;
	var yMax = 480;
	if (document.all)
	{
		xMax = screen.width;
		yMax = screen.height;
	}
    else if (document.layers)
	{
		xMax = window.outerWidth;
		yMax = window.outerHeight;
	}
    var xOffset = (xMax - Width) / 2;
    var yOffset = (yMax - Height) / 2;

	return window.open(URL, "SmallWindow", "width=" + Width + ",height=" + Height + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",status=no,toolbar=no,menubar=no");
}

function RepositionSmallWindow()
{
	RepositionWindow(350, 275);
}

function RepositionWindow(Width, Height)
{
	var xMax = 640;
	var yMax = 480;
	if (document.all)
	{
		xMax = screen.width;
		yMax = screen.height;
	}
    else if (document.layers)
	{
		xMax = window.outerWidth;
		yMax = window.outerHeight;
	}
    var xOffset = (xMax - Width) / 2;
    var yOffset = (yMax - Height) / 2;
    window.resizeTo(Width, Height);
    window.moveTo(xOffset, yOffset);
}

function OpenWindow(URL, Name, Width, Height, Scrollbars)
{
	window.open(URL, Name, "scrollbars=" + (Scrollbars ? "1" : "0") + ",width=" + Width + ",height=" + Height);
}

function WriteSearchForm()
{
	var S = new String(document.location).toLowerCase();
	var ToReturn = "";
	if (UserLanguage == "EN-US")
	{
		ToReturn += ("<form action=\"/movies/search.aspx\" onsubmit=\"this.action=document.getElementById('MainSearchSelect').value=='Google'||document.getElementById('MainSearchSelect').value=='IMDB'?'/SinglePages/' + document.getElementById('MainSearchSelect').value + '.aspx':'/'+document.getElementById('MainSearchSelect').value+'/Search.aspx'\">");
		ToReturn += ("<table cellspacing=\"2\" width=\"100%\">");
		ToReturn += ("<tr>");
		ToReturn += ("<td nowrap=\"nowrap\" width=\"100%\"><input type=\"text\" name=\"Keywords\" style=\"width:120pt\"");
		if (window.Keywords)
			ToReturn += (" value=\"" + Keywords + "\"");
		ToReturn += (" /></td>");
		ToReturn += ("<td rowspan=\"2\" valign=\"bottom\"><input class=\"Button\" type=\"submit\" value=\"Search\" /><br /><a style=\"color:black;font-size:8pt;cursor:pointer\" onclick=\"this.href=document.getElementById('MainSearchSelect').value=='Google'||document.getElementById('MainSearchSelect').value=='IMDB'?'/SinglePages/' + document.getElementById('MainSearchSelect').value + '.aspx':'/'+document.getElementById('MainSearchSelect').value+'/Search.aspx'\">Advanced</a></td>");
		ToReturn += ("</tr>");
		ToReturn += ("<tr>");
		ToReturn += ("<td nowrap=\"nowrap\">");
		ToReturn += ("<select name='MainSearchSelect' id='MainSearchSelect' style=\"width:100%\">");
		ToReturn += ("<option " + (S.indexOf("/movies/") != -1 ? "selected=\"selected\" " : "") + "value=\"Movies\">Movies & Series</option>");
		ToReturn += ("<option " + (S.indexOf("/forum/") != -1 ? "selected=\"selected\" " : "") + "value=\"Forum\">Forums</option>");
		ToReturn += ("<option " + (S.indexOf("/wallpapers/") != -1 ? "selected=\"selected\" " : "") + "value=\"Wallpapers\">Wallpapers</option>");
		ToReturn += ("<option " + (S.indexOf("/fonts/") != -1 ? "selected=\"selected\" " : "") + "value=\"Fonts\">Fonts</option>");
		ToReturn += ("<option " + (S.indexOf("/gamesreviews/") != -1 ? "selected=\"selected\" " : "") + "value=\"GamesReviews\">Games reviews</option>");
		ToReturn += ("<option " + (S.indexOf("/pictureholder/") != -1 ? "selected=\"selected\" " : "") + "value=\"PictureHolder\">Funny pictures</option>");
		ToReturn += ("<option " + (S.indexOf("/videoholder/") != -1 ? "selected=\"selected\" " : "") + "value=\"VideoHolder\">Funny videos</option>");
		ToReturn += ("<option " + (S.indexOf("/onlinegames/") != -1 ? "selected=\"selected\" " : "") + "value=\"OnlineGames\">Online games</option>");
		ToReturn += ("<option " + (S.indexOf("/downloads/") != -1 ? "selected=\"selected\" " : "") + "value=\"Downloads\">Downloads</option>");
		ToReturn += ("<option " + (S.indexOf("/schoolpapers/") != -1 ? "selected=\"selected\" " : "") + "value=\"SchoolPapers\">School papers</option>");
		ToReturn += ("<option " + (S.indexOf("/guides/") != -1 ? "selected=\"selected\" " : "") + "value=\"Guides\">Guides</option>");
		ToReturn += ("<option " + (S.indexOf("/recipes/") != -1 ? "selected=\"selected\" " : "") + "value=\"Recipes\">Recipes</option>");
		ToReturn += ("<option " + (S.indexOf("/jokes/") != -1 ? "selected=\"selected\" " : "") + "value=\"Jokes\">Jokes</option>");
		ToReturn += ("<option " + (S.indexOf("/blogs/") != -1 ? "selected=\"selected\" " : "") + "value=\"Blogs\">Blogs</option>");
		ToReturn += ("<option " + (S.indexOf("/faq/") != -1 ? "selected=\"selected\" " : "") + "value=\"FAQ\">FAQ</option>");
		ToReturn += ("<option " + (S.indexOf("/users/") != -1 ? "selected=\"selected\" " : "") + "value=\"Users\">Users</option>");
		ToReturn += ("<option " + (S.indexOf("/Singlepages/Google.aspx") != -1 ? "selected=\"selected\" " : "") + "value=\"Google\">Google</option>");
		ToReturn += ("<option " + (S.indexOf("/singlepages/imdb.aspx") != -1 ? "selected=\"selected\" " : "") + "value=\"IMDB\">IMDB</option>");
		ToReturn += ("</select>");
		ToReturn += ("</td>");
		ToReturn += ("</tr>");
		ToReturn += ("</table>");
		ToReturn += ("</form>");
	}
	else
	{
		ToReturn += ("<form action=\"/movies/search.aspx\" onsubmit=\"this.action=document.getElementById('MainSearchSelect').value=='Google'||document.getElementById('MainSearchSelect').value=='IMDB'?'/SinglePages/' + document.getElementById('MainSearchSelect').value + '.aspx':'/'+document.getElementById('MainSearchSelect').value+'/Search.aspx'\">");
		ToReturn += ("<table cellspacing=\"2\" width=\"100%\">");
		ToReturn += ("<tr>");
		ToReturn += ("<td nowrap=\"nowrap\" width=\"100%\"><input type=\"text\" name=\"Keywords\" style=\"width:120pt\"");
		if (window.Keywords)
			ToReturn += (" value=\"" + Keywords + "\"");
		ToReturn += (" /></td>");
		ToReturn += ("<td rowspan=\"2\" valign=\"bottom\">");
		if (Time != null)
		    ToReturn += ("<div style=\"text-align:center;margin:1px;font-size:10px\">" + Time + "</div>");
		ToReturn += ("<input class=\"Button\" type=\"submit\" value=\"&#x05D7;&#x05E4;&#x05E9;\" /><br /><a style=\"color:black;font-size:8pt;cursor:pointer\" onclick=\"this.href=document.getElementById('MainSearchSelect').value=='Google'||document.getElementById('MainSearchSelect').value=='IMDB'?'/SinglePages/' + document.getElementById('MainSearchSelect').value + '.aspx':'/'+document.getElementById('MainSearchSelect').value+'/Search.aspx'\">&#x05DE;&#x05EA;&#x05E7;&#x05D3;&#x05DD;</a></td>");
		ToReturn += ("</tr>");
		ToReturn += ("<tr>");
		ToReturn += ("<td nowrap=\"nowrap\">");
		ToReturn += ("<select name='MainSearchSelect' id='MainSearchSelect' style=\"width:100%\">");
		ToReturn += ("<option " + (S.indexOf("/movies/") != -1 ? "selected=\"selected\" " : "") + "value=\"Movies\">&#x05E1;&#x05E8;&#x05D8;&#x05D9;&#x05DD; &#x05D5;&#x05E1;&#x05D3;&#x05E8;&#x05D5;&#x05EA;</option>");
		ToReturn += ("<option " + (S.indexOf("/forum/") != -1 ? "selected=\"selected\" " : "") + "value=\"Forum\">&#x05E4;&#x05D5;&#x05E8;&#x05D5;&#x05DE;&#x05D9;&#x05DD;</option>");
		ToReturn += ("<option " + (S.indexOf("/wallpapers/") != -1 ? "selected=\"selected\" " : "") + "value=\"Wallpapers\">&#x05E8;&#x05E7;&#x05E2;&#x05D9;&#x05DD; &#x05DC;&#x05DE;&#x05D7;&#x05E9;&#x05D1;</option>");
		ToReturn += ("<option " + (S.indexOf("/fonts/") != -1 ? "selected=\"selected\" " : "") + "value=\"Fonts\">&#x05E4;&#x05D5;&#x05E0;&#x05D8;&#x05D9;&#x05DD;</option>");
		ToReturn += ("<option " + (S.indexOf("/gamesreviews/") != -1 ? "selected=\"selected\" " : "") + "value=\"GamesReviews\">&#x05E1;&#x05E7;&#x05D9;&#x05E8;&#x05D5;&#x05EA; &#x05DE;&#x05E9;&#x05D7;&#x05E7;&#x05D9;&#x05DD;</option>");
		ToReturn += ("<option " + (S.indexOf("/pictureholder/") != -1 ? "selected=\"selected\" " : "") + "value=\"PictureHolder\">&#x05EA;&#x05DE;&#x05D5;&#x05E0;&#x05D5;&#x05EA; &#x05DE;&#x05E6;&#x05D7;&#x05D9;&#x05E7;&#x05D5;&#x05EA;</option>");
		ToReturn += ("<option " + (S.indexOf("/videoholder/") != -1 ? "selected=\"selected\" " : "") + "value=\"VideoHolder\">&#x05E1;&#x05E8;&#x05D8;&#x05D5;&#x05E0;&#x05D9;&#x05DD; &#x05DE;&#x05E6;&#x05D7;&#x05D9;&#x05E7;&#x05D9;&#x05DD;</option>");
		ToReturn += ("<option " + (S.indexOf("/onlinegames/") != -1 ? "selected=\"selected\" " : "") + "value=\"OnlineGames\">&#x05DE;&#x05E9;&#x05D7;&#x05E7;&#x05D9;&#x05DD; &#x05D0;&#x05D5;&#x05E0;&#x05DC;&#x05D9;&#x05D9;&#x05DF;</option>");
		ToReturn += ("<option " + (S.indexOf("/downloads/") != -1 ? "selected=\"selected\" " : "") + "value=\"Downloads\">&#x05D4;&#x05D5;&#x05E8;&#x05D3;&#x05D5;&#x05EA;</option>");
		ToReturn += ("<option " + (S.indexOf("/schoolpapers/") != -1 ? "selected=\"selected\" " : "") + "value=\"SchoolPapers\">&#x05E2;&#x05D1;&#x05D5;&#x05D3;&#x05D5;&#x05EA; &#x05DC;&#x05D1;&#x05D9;&#x05EA; &#x05E1;&#x05E4;&#x05E8;</option>");
		ToReturn += ("<option " + (S.indexOf("/guides/") != -1 ? "selected=\"selected\" " : "") + "value=\"Guides\">&#x05DE;&#x05D3;&#x05E8;&#x05D9;&#x05DB;&#x05D9;&#x05DD;</option>");
		ToReturn += ("<option " + (S.indexOf("/recipes/") != -1 ? "selected=\"selected\" " : "") + "value=\"Recipes\">&#x05DE;&#x05EA;&#x05DB;&#x05D5;&#x05E0;&#x05D9;&#x05DD;</option>");
		ToReturn += ("<option " + (S.indexOf("/jokes/") != -1 ? "selected=\"selected\" " : "") + "value=\"Jokes\">&#x05D1;&#x05D3;&#x05D9;&#x05D7;&#x05D5;&#x05EA;</option>");
		ToReturn += ("<option " + (S.indexOf("/blogs/") != -1 ? "selected=\"selected\" " : "") + "value=\"Blogs\">&#x05D1;&#x05DC;&#x05D5;&#x05D2;&#x05D9;&#x05DD;</option>");
		ToReturn += ("<option " + (S.indexOf("/faq/") != -1 ? "selected=\"selected\" " : "") + "value=\"FAQ\">&#x05E9;&#x05D0;&#x05DC;&#x05D5;&#x05EA; &#x05E0;&#x05E4;&#x05D5;&#x05E6;&#x05D5;&#x05EA;</option>");
		ToReturn += ("<option " + (S.indexOf("/users/") != -1 ? "selected=\"selected\" " : "") + "value=\"Users\">&#x05DE;&#x05E9;&#x05EA;&#x05DE;&#x05E9;&#x05D9;&#x05DD;</option>");
		ToReturn += ("<option " + (S.indexOf("/singlepages/google.aspx") != -1 ? "selected=\"selected\" " : "") + "value=\"Google\">Google</option>");
		ToReturn += ("<option " + (S.indexOf("/singlepages/imdb.aspx") != -1 ? "selected=\"selected\" " : "") + "value=\"IMDB\">IMDB</option>");
		ToReturn += ("</select>");
		ToReturn += ("</td>");
		ToReturn += ("</tr>");
		ToReturn += ("</table>");
		ToReturn += ("</form>");
	}
	return ToReturn;
}

function DisableButtons(Object)
{
	for (var i = 0; i < Object.childNodes.length; i++)
		if (Object.childNodes[i].type == 'submit' || Object.childNodes[i].type == 'button')
			Object.childNodes[i].disabled = true;
		else
			DisableButtons(Object.childNodes[i]);
}

function InputFocus(Object)
{
	if (Object.className == "TextI")
	{
		Object.className = "Text";
		Object.value = "";
	}
}

function InputBlur(Object)
{
	if (Object.value == "")
	{
		Object.value = Object.title;
		Object.className = "TextI";
	}
}

function ClearItalicValues(Object)
{
	for (var i = 0; i < Object.childNodes.length; i++)
		if (Object.childNodes[i].className == 'TextI')
		{
			Object.childNodes[i].className = 'Text';
			Object.childNodes[i].value = '';
		}
		else
			ClearItalicValues(Object.childNodes[i]);
}

function GenerateMediaPlayer(Obj, URL, Width, Height, Length)
{
    var Size = "";
	if (Width == null && Height == null)
		Size = " width=\"300\" height=\"40\"";
	else
	{
		if (Width != null)
			Size += " width=\"" + Width + "\"";
		if (Height != null)
			Size += " height=\"" + Height + "\"";
	}
	
	var HTML = "<OBJECT style=\"border:solid 1px #AEAEAE\" id=\"VIDEO\" width=\"" + Width + "\" height=\"" + Height + "\"";
	HTML += " CLASSID=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\"";
	HTML += " type=\"application/x-oleobject\">";
	
	HTML += "<PARAM NAME=\"URL\" VALUE=\"" + URL + "\">";
	HTML += "<PARAM NAME=\"SendPlayStateChangeEvents\" VALUE=\"True\">";
	HTML += "<PARAM NAME=\"AutoStart\" VALUE=\"False\">";
	HTML += "<PARAM name=\"uiMode\" value=\"none\">";
	HTML += "<PARAM name=\"PlayCount\" value=\"0\">";
    HTML += "</OBJECT>";

    
    HTML += "<table width=\"" + (Width + 2) + "\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
	HTML += "<tr>";
		HTML += "<td style=\"width:4px;height:4px;background-image:url(/images/VideoButtons_04.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td colspan=\"6\" style=\"width:100%;height:4px;background-image:url(/images/VideoButtons_02.gif)\"></td>";
		HTML += "<td style=\"width:4px;height:4px;background-image:url(/images/VideoButtons_01.gif)\" nowrap=\"nowrap\"></td>";
	HTML += "</tr>";
	HTML += "<tr>";
		HTML += "<td style=\"width:4px;height:17px;background-image:url(/images/VideoButtons_12.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td style=\"font-size:9pt;color:white;font-weight:bold;padding-right:5px;width:100%;height:17px;background-image:url(/images/VideoButtons_07.gif)\">" + Length + "</td>";
		HTML += "<td onclick=\"if(document.getElementById('VIDEO').playState==3)document.getElementById('VIDEO').fullScreen=true\" style=\"cursor:pointer;width:19px;height:17px;background-image:url(/images/VideoButtons_10.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td style=\"width:9px;height:17px;background-image:url(/images/VideoButtons_07.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td onclick=\"document.getElementById('VIDEO').controls.stop()\" style=\"cursor:pointer;width:19px;height:17px;background-image:url(/images/VideoButtons_08.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td style=\"width:1px;height:17px;background-image:url(/images/VideoButtons_07.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td onclick=\"document.getElementById('VIDEO').controls.play()\" style=\"cursor:pointer;width:18px;height:17px;background-image:url(/images/VideoButtons_06.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td style=\"width:4px;height:17px;background-image:url(/images/VideoButtons_05.gif)\" nowrap=\"nowrap\"></td>";
	HTML += "</tr>";
	HTML += "<tr>";
		HTML += "<td style=\"width:4px;height:4px;background-image:url(/images/VideoButtons_16.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td colspan=\"6\" style=\"width:100%;height:4px;background-image:url(/images/VideoButtons_14.gif)\" nowrap=\"nowrap\"></td>";
		HTML += "<td style=\"width:4px;height:4px;background-image:url(/images/VideoButtons_13.gif)\" nowrap=\"nowrap\"></td>";
	HTML += "</tr>";
    HTML += "</table>";

	Obj.innerHTML += HTML;
}

function GenerateMediaPlayer2(Obj, URL, Width, Height)
{
	var Size = "";
	if (Width == null && Height == null)
		Size = " width=\"300\" height=\"40\"";
	else
	{
		if (Width != null)
			Size += " width=\"" + Width + "\"";
		if (Height != null)
			Size += " height=\"" + Height + "\"";
	}
	
	var Html = "<OBJECT ID=\"MediaPlayer\" " + Size + " CLASSID=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" STANDBY=\"Loading Windows Media Player components...\" TYPE=\"application/x-oleobject\"><PARAM name=\"autoStart\" value=\"False\"><PARAM name=\"filename\" value=\"" + URL + "\"><EMBED TYPE=\"application/x-mplayer2\" NAME=\"MediaPlayer\" " + Size + " SRC=\"" + URL + "\"></EMBED></OBJECT>";
	Obj.innerHTML += Html;
	return;

	var lngMP70;
	try
	{
		lngMP70 = ActiveXObject("WMPlayer.OCX");
	}
	catch(E){}
	var Size = "";
	if (Width == null && Height == null)
		Size = " width=\"300\" height=\"40\"";
	else
	{
		if (Width != null)
			Size += " width=\"" + Width + "\"";
		if (Height != null)
			Size += " height=\"" + Height + "\"";
	}
	if (lngMP70 == null) //6.4
	{
		if (Obj.innerHTML.indexOf("<OBJECT id=MediaPlayer") == -1)
		{
			if (Width == null && Height == null)
				Obj.innerHTML += ("<OBJECT id=MediaPlayer CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 standby=\"Loading Microsoft Windows Media Player components...\" TYPE=\"application/x-oleobject\"" + Size + "><PARAM NAME=\"FileName\" VALUE=\"" + URL + "\"><PARAM NAME=\"AutoStart\" VALUE=\"false\"><PARAM NAME=\"ShowControls\" VALUE=\"1\"><PARAM NAME=\"ShowDisplay\" VALUE=\"false\" /></OBJECT>");
			else
				Obj.innerHTML += ("<OBJECT id=MediaPlayer CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 standby=\"Loading Microsoft Windows Media Player components...\" TYPE=\"application/x-oleobject\"" + Size + "><PARAM NAME=\"FileName\" VALUE=\"" + URL + "\"><PARAM NAME=\"AutoStart\" VALUE=\"false\"><PARAM NAME=\"ShowControls\" VALUE=\"1\"></OBJECT>");
		}
	}
	else
	{
		if (Obj.innerHTML.indexOf("<OBJECT id=MediaPlayer") == -1)
			Obj.innerHTML += ("<OBJECT id=MediaPlayer CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6 standby=\"Loading Microsoft Windows Media Player components...\" TYPE=\"application/x-oleobject\"" + Size + "><PARAM NAME=\"URL\" VALUE=\"" + URL + "\"><PARAM NAME=\"AutoStart\" VALUE=\"false\"><PARAM NAME=\"ShowControls\" VALUE=\"1\"><PARAM NAME=\"uiMode\" VALUE=\"mini\"></OBJECT>");
	}
}

function SetClipboard2(Value)
{
	clipboardData.setData("TEXT", Value);
}

function SetClipboard(Value)
{
	_SetClipboard(Value);
}

function _SetClipboard(Value)
{
	if (window.clipboardData) 
		clipboardData.setData("Text", Value);
	else if (window.netscape) 
	{ 
		var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
		if (!clip) 
			return;
		var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
		if (!trans) 
			return;
		trans.addDataFlavor('text/unicode');
		var str = new Object();
		var len = new Object();

		var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);

		var copytext = Value;

		str.data = Value;

		trans.setTransferData("text/unicode", str, copytext.length * 2);

		var clipid = Components.interfaces.nsIClipboard;
		
		if (!clip) 
			return false;

		clip.setData(trans, null, clipid.kGlobalClipboard);
	}
	else
		return false;
	return true;
}

function CheckChildren(object)
{
	CheckChildrenInternal(object, object.checked);
}

function CheckChildrenInternal(object, Checked)
{
	var Value = object.value;
	var ChildNodes = object.parentElement.childNodes;
	for (var i = 0; i < ChildNodes.length; i++)
	{
		var ChildNode = ChildNodes[i];
		if (ChildNode.accessKey == Value)
		{
			ChildNode.checked = Checked;
			CheckChildrenInternal(ChildNode, Checked);
		}
	}
}

function PopStatistics(ID1, ID2)
{
    OpenWindow("/Stats/Stats.aspx?ID1=" + ID1 + "&ID2=" + ID2, "StatsWindow", 745, 480, true);
}
