var c = document.cookie;
var cc = c.split(";");
if (cc[0] != "Myweb")     
	document.cookie="Myweb; path=/; domain=.myweb.hinet.net";
r();

function openWin(url)
{
    var newWin = window.open(url);
    newWin.focus();
	return false;
}

function addLoadEvent(func)
{
    var oldonload = window.onload;
    if (typeof window.onload != 'function')
    {
        window.onload = func;
    }
    else
    {
        window.onload = function() {
            oldonload();
            func();            
        }
    }
}

function insertAfter(newElement, targetElement)
{
	var parent = targetElement.parentNode;
	if (parent.lastChild == targetElement)
		parent.appendChild(newElement);
	else
		parent.insertBefore(newElement, targetElement.nextSibling);
}


function r()
{
	if (window.parent && window.parent.document) 
	{
		var fs = window.parent.document.getElementsByTagName("frame");
		if (fs && fs[0])
			fs[0].parentNode.cols = "*,0";
	
/*	
if (parent.frames.length > 0) {
    parent.location.href = self.document.location
}
*/

/*		
		if (self != top) {
			if (document.images)
				top.location.replace(window.location.href);
			else
				top.location.href = window.location.href;
		}
*/			
/*			
		var url = location.href;
		var i = url.indexOf("?MywebPageId=");
		url = url.substring(0, i);
		alert(url);
*/		
	    //top.location.href = url;
	}
}
    		
/* ************************************************
 * animated cursor
 * ************************************************ */
 /*
  //colours=new Array('#ff0000','#00ff00','#ffffff','#ff00ff','#ffa500','#ffff00','#00ff00','#ffffff','ff00ff')
    colours=new Array('#737364','#ffffff','#2F2F27','#FAFAF6','#E8E8CE','#737364','#999999','#ffffff','E8E8CE')

	n = 10;
    y = 0;
    x = 0;
    n6=(document.getElementById&&!document.all);
    ns=(document.layers);
    ie=(document.all);
    d=(ns||ie)?'document.':'document.getElementById("';
    a=(ns||n6)?'':'all.';
    n6r=(n6)?'")':'';
    s=(ns)?'':'.style';
    
	if (ns)
	{
        for (i = 0; i < n; i++)
            document.write('<layer name="dots'+i+'" top=0 left=0 width='+i/2+' height='+i/2+' bgcolor=#ff0000></layer>');
    }

    if (ie)
        document.write('<div id="con" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    
	if (ie||n6)
	{
        for (i = 0; i < n; i++)
            document.write('<div id="dots'+i+'" style="position:absolute;top:0px;left:0px;width:'+i/4+'px;height:'+i/4+'px;background:#ff0000;font-size:'+i/4+'"></div>');
    }

    if (ie)
        document.write('</div></div>');
    
	(ns||n6)?window.captureEvents(Event.MOUSEMOVE):0;

    function Mouse(evnt)
	{
        y = (ns||n6)?evnt.pageY+4 - window.pageYOffset:event.y+4;
        x = (ns||n6)?evnt.pageX+1:event.x+1;
    }

    (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;

    function animateCursor()
	{
        o=(ns||n6)?window.pageYOffset:0;
        if (ie)
		    con.style.top=document.body.scrollTop;
        
		for (i = 0; i < n; i++)
		{
            var temp1 = eval(d+a+"dots"+i+n6r+s);
            randcolours = colours[Math.floor(Math.random()*colours.length)];
            (ns)?temp1.bgColor = randcolours:temp1.background = randcolours; 

            if (i < n-1)
			{
                var temp2 = eval(d+a+"dots"+(i+1)+n6r+s);
                temp1.top = parseInt(temp2.top);
                temp1.left = parseInt(temp2.left);
            } 
            else
			{
                temp1.top = y+o;
                temp1.left = x;
            }
        }
        setTimeout("animate()",10);
    }
	*/
	
//addLoadEvent(r); 	
