var w, h, p;
w=screen.availWidth;
h=screen.availHeight;
p=parent.frames.length;
if (w > 780) {w=780;}
if (h > 590) {h=590;}

function parentTitle(title_text) {
	if (p != 0) { parent.ct(title_text); }
}

function nwin(link, wWidth, wHeight, wName) {
  if(wWidth == null) { wWidth = w; }
  if(wHeight == null) { wHeight = h; }
  if(wName == null) { wName = "new_win"; }
  window.open(link , wName, "toolbar=0,location=0,scrollbars,resizable,width="+wWidth+",height="+wHeight);
}

function imgWin(img, alt) {
  link = "/phpScripts/imgWin.php?img="+img+"&alt="+alt;
  window.open(link, "imgWin", "toolbar=0,location=0,resizable,width=400,height=400");
}

function flashWin(fSrc, alt, wWidth, wHeight) {
  if(wWidth == null) { wWidth = w; }
  if(wHeight == null) { wHeight = h; }
  link = "../phpScripts/flashWin.php?fSrc="+fSrc+"&alt="+alt+"&wWidth="+wWidth+"&wHeight="+wHeight;
  window.open(link, "flashWin", "toolbar=0,location=0,resizable,width="+wWidth+",height="+wHeight);
}

function rateMovie(mark) {
  document.rm.mark.value = mark;
  document.rm.submit();
}

function doar(name, at, txt) {
	fullAdd = name + '@' + at;
	if(txt)
	  document.write('<A HREF="mailto:' + fullAdd + '" title="Click to e-mail">' + txt + '</A>');
	else
	  document.write('<A HREF="mailto:' + fullAdd + '" title="Click to e-mail">' + fullAdd + '</A>');
}

/***************************************/
var opendSegment = 'non';
function showSegment(segmentId) {
	if(segmentId != opendSegment && opendSegment != 'non') {
		hideSegment(opendSegment);
	} else if(segmentId == opendSegment) {
		hideSegment(segmentId);
		return;
	}
	document.getElementById(segmentId).style.position = "static";
	document.getElementById(segmentId).style.visibility = "visible";
	opendSegment = segmentId;
	window.location.hash = '#anchor-' + segmentId;
}

function hideSegment(segmentId) {
	document.getElementById(segmentId).style.position = "absolute";
	document.getElementById(segmentId).style.visibility = "hidden";
	opendSegment = 'non';
	window.location.hash = '#anchor-' + segmentId;
}

/*****************************/


function show(id) {
		if (document.getElementById) document.getElementById(id).style.visibility = "visible"
		else if (document.all) document.all[id].style.visibility = "visible"
		else if (document.layers) document.layers[id].style.visibility = "show"
}

function hide(id) {
		if (document.getElementById) document.getElementById(id).style.visibility = "hidden"
		else if (document.all) document.all[id].style.visibility = "hidden"
		else if (document.layers) document.layers[id].style.visibility = "hide"
}

function screenObject() {
	this.bottom = function(){
		if (document.body.scrollHeight) return document.body.scrollHeight};
	
	this.height = function() {
		if (document.body.offsetHeight) return document.body.offsetHeight;}
	
	this.visHeight = function() {
		if (window.innerHeight) return window.innerHeight;
		if (document.body.clientHeight) return document.body.clientHeight;}
	
	this.width = function() {
		if (document.body.offsetWidth) return document.body.offsetWidth;}
	
	this.scrollTop = function() {
		if(document.body.scrollTop) return document.body.scrollTop
		if (window.pageYOffset) return window.pageYOffset;
		else return 0;};
	}


function hidereply() {
	if (is.ns){document.replyDiv.visibility="hide"}
	if (is.ie){replyDiv.style.visibility="hidden"}
}

function writereply() {
	if (is.ns) {
		document.replyDiv.top=window.pageYOffset+150
		document.replyDiv.visibility="show"
	}
	if (is.ie) {
		replyDiv.style.top=document.body.scrollTop+150
		replyDiv.style.visibility="visible"
	}
}


function SwapVis(id) {
	if (document.getElementById(id).style.display == "") {
		show = "none";
	}
	else{
		show = "";
	}
	document.getElementById(id).style.display = show;
}

function eXTReMe(both) {
	document.write('<a target="_top" href="http://extreme-dm.com/s/?tag=sivany"><img name=im src="http://extreme-dm.com/i/" width=1 height=1 border=0 width=41 alt=""></a><script language="javascript"><!-- an=navigator.appName;d=document; function pr(){d.write("<img src=\"http://extreme-dm.com", "/z/?tag=sivany&j=y&srw="+srw+"&srb="+srb+"&", "rs="+r+"&l="+escape(parent.document.referrer)+"\" height=1 ", "width=1>");}srb="na";srw="na"; //--></script> <script language="javascript1.2"><!-- s=screen;srw=s.width;an!="Netscape"?srb=s.colorDepth:srb=s.pixelDepth; //--></script> <script language="javascript"><!-- r=41;d.images?r=d.im.width:z=0;pr(); //--></script> <noscript><img height=1 width=1 alt="" src="http://extreme-dm.com/z/?tag=sivany&j=n"></noscript>');

	if(both)
	  document.write('<img name=im src="http://w1.extreme-dm.com/i.gif" height=1 border=0 width=1>' + 
	    '<script language="javascript"><!-- an=navigator.appName;d=document;' + 
	    'function pr(){d.write("<img src=\"http://w0.extreme-dm.com", "/0.gif?tag=ymj&j=y&srw="+srw+"&srb="+srb+"&",' + 
	    '"rs="+r+"&l="+escape(parent.document.referrer)+"\" height=1 ", "width=1>");}srb="na";srw="na"; //-->' + 
	    '</script><script language="javascript1.2"><!-- s=screen;srw=s.width;an!="Netscape"?srb=s.colorDepth:srb=s.pixelDepth;//-->' + 
	    '</script><script language="javascript"><!-- r=41;d.images?r=d.im.width:z=0;pr();//-->' + 
	    '</script><noscript><img height=1 width=1 src="http://w0.extreme-dm.com/0.gif?tag=ymj&j=n"></noscript>');
}

function teXTReMe() {
	document.write('<img src="http://w1.extreme-dm.com/i.gif" height=1 border=0 width=1 alt=""></a><script language="javascript1.2"><!-- EXs=screen;EXw=EXs.width;navigator.appName!="Netscape"?EXb=EXs.colorDepth:EXb=EXs.pixelDepth;//--> </script><script language="javascript"><!-- EXd=document;EXw?"":EXw="na";EXb?"":EXb="na"; EXd.write("<img src=\"http://w0.extreme-dm.com", "/0.gif?tag=or5en&j=y&srw="+EXw+"&srb="+EXb+"&", "l="+escape(EXd.referrer)+"\" height=1 width=1>");//--> </script><noscript><img height=1 width=1 src="http://w0.extreme-dm.com/0.gif?tag=or5en&j=n"></noscript>');
}