var newwindow = '';

function WhoMI(){
    return(location.href);
}
function popitup(url) {
	if (!newwindow.closed && newwindow.location) {
		newwindow.location.href = url;
	}
    else {
		newwindow=window.open(url,'name','toolbar=no,directories=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,width=500, height=600');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}

function JSFX_FloatDiv_y(id, sy)
{
    //this one was done by Amir Dagan, based on the function later on
    //this func is only for the y axis, and only for positive numbers
    // i.e. relevant for the upper border
    // *********************************************************
    // * You may use this code for free on any web page provided that 
    // * these comment lines and the following credit remain in the code.
    // * Floating Div from http://www.javascript-fx.com
    // ********************************************************  -->
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cy = el.sy = sy;
	el.sP=function(y){this.style.top=y+px;};
	el.flt=function()
	{
		var pY;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
        this.cy += (pY + this.sy - this.cy)/8
		this.sP(this.cy);
		setTimeout(this.id + "_obj.flt()", 40);
	}
	return el;
}
function JSFX_FloatDiv(id, sx, sy)
{
    // *********************************************************
    // * You may use this code for free on any web page provided that 
    // * these comment lines and the following credit remain in the code.
    // * Floating Div from http://www.javascript-fx.com
    // ********************************************************  -->
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
	el.flt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.flt()", 40);
	}
	return el;
}
//This new func only scroll the screen
// It is because bug in FireFox that made upper layer mask buttons
// in other layer (not in its region)
// so I move to table with scroll option
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(iState==1) {
        self.scrollTo(800,0);
    }
    else if(iState==0) {
        self.scrollTo(0,0);
    }
}
function Old_toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}


function BadEmail(mail) {
    if((mail.indexOf('@',0) < 1)||
       (mail.indexOf.lastIndexOf('@') != mail.indexOf.indexOf('@',0))) {
        return true;
    }
    return false;
}
function WithoutContent(ss) {
    if(ss.length > 0) { return false; }
    return true;
}


function CreateBookmarkLink() {

 title = document.title;//"Webpage Title"; 
  // Blogger - Replace with <$BlogItemTitle$> 
  // MovableType - Replace with <$MTEntryTitle$>

 url = location.href;//"Webpage URL";
  // Blogger - Replace with <$BlogItemPermalinkURL$> 
  // MovableType - Replace with <$MTEntryPermalink$>
  // WordPress - <?php bloginfo('url'); ?>

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 }

 