<!--


function MM_openBrWindow(theURL,winName,features) { //v2.0


  window.open(theURL,winName,features);


}


//-->
<!--
function openDSWindow(id) {
window.open('free-gifts.php','special_offers','menubar=no, scrollbars=no, width=500, height=270, directories=no,location=no,resizable=yes,status=no,toolbar=no')
}
//-->

<!--
function openNSWindow(id) {
window.open('top-names.php','special_offers','menubar=no, scrollbars=no, width=500, height=270, directories=no,location=no,resizable=yes,status=no,toolbar=no')
}
//-->

<!--
function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=700');");
}

// -->
<!--
function popUp8(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=190');");
}

// -->

<!--
function popUp9(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=440,height=350');");
}

// -->
<!--
function popUp3(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=440,height=510');");
}

// -->

<!--
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=475,height=385');");
}

// -->

<!--
function launch(url, popup,x,y) {
self.name = "opener";
remote = open(url, popup, "width="+x+",height="+y);
}
// -->

<!--
function popC(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=350');");
}

// -->
<!--
function popP(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=440,height=270');");
}

// -->
<!--
function popZ(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=355');");
}

// -->
<!--
function popNav(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=697,height=600');");
}

// -->
<!--
function popUp4(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=390,height=340');");
}

// -->
<!--
function popUp5(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=410,height=390');");
}

// -->
<!--
function popUp7(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=410,height=270');");
}

// -->
<!--
function popIP(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=440,height=340');");
}

// -->

<!--
function popNav2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=740,height=490');");
}

// -->
<!--
function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}


//-->

<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->



function emailFriend(prod) {
		var getstring = 'prod='+prod;
		if (document.forms["emailfriendform"]) {
			lis=document.forms["emailfriendform"].getElementsByTagName('input');
			for (var i=0; i<lis.length; i++){
				 getstring += '&'+lis[i].name+"="+escape(lis[i].value);
			}
			getstring += '&comments='+escape($('comments').value);
		}
	http.open("get", "tstoreadmin/emailfriend.php?"+getstring);
	http.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	http.onreadystatechange = emailFriendResp;
	http.send(null);
//	genajax('tstoreadmin/emailfriend.php?prod='+prod,'wishdiv',Effect.Appear,'',pname);
}

function emailFriendResp() {
	if(http.readyState == 4){
		var response = http.responseText;
		var update = new Array();
		emaildiv = document.getElementById('email_friend');
		if (response){
			emaildiv.innerHTML = response;
			if (emaildiv.style.display == "none") {
				pagesize = getPageSize();
				document.getElementById('greyout').style.height=pagesize[1]+'px';
				new Effect.Appear('greyout',{from:0.0,to:0.8,duration:0.2});
				new Effect.Appear(emaildiv.id,{duration:0.4});
			}
			
		}
	}
}
function closeEmailFriend() {
	emailFriendResp();
	new Effect.Fade('email_friend',{duration:0.4});
	new Effect.Fade('greyout',{from:0.8,to:0.0,duration: 0.2})
	setTimeout(function () {$('email_friend').innerHTML = '';},800);
}

function createRequestObject() {
	var ro;
	ro = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
	return ro;
}
var http = createRequestObject();



function newsletter() {
		var getstring = '';
		if (document.forms["newsletterform"]) {
			lis=document.forms["newsletterform"].getElementsByTagName('input');
			for (var i=0; i<lis.length; i++){
				 getstring += '&'+lis[i].name+"="+escape(lis[i].value);
			}
		}
	if (!$('news_join')) {
		$('fullscreen').innerHTML += "<div id='news_join' style='display: none';></div>";
	}
	http.open("get", "tstoreadmin/newsletter.php?"+getstring);
	http.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	http.onreadystatechange = newsletterResp;
	http.send(null);
//	genajax('tstoreadmin/emailfriend.php?prod='+prod,'wishdiv',Effect.Appear,'',pname);
}

function newsletterResp() {
	if(http.readyState == 4){
		var response = http.responseText;
		var update = new Array();
		emaildiv = document.getElementById('news_join');
		if (response){
			emaildiv.innerHTML = response;
			if (emaildiv.style.display == "none") {
				pagesize = getPageSize();
				$('greyout').style.height=pagesize[1]+'px';
				new Effect.Appear('greyout',{from:0.0,to:0.8,duration:0.2});
				new Effect.Appear(emaildiv.id,{duration:0.4});
			}
			if ($('newsletter_success')) {
				setTimeout("closeNewsletter();",1000);
			}
			
		}
	}
}
function closeNewsletter() {
	new Effect.Fade('news_join',{duration:0.4});
	new Effect.Fade('greyout',{from:0.8,to:0.0,duration: 0.2})
	setTimeout(function () {$('news_join').innerHTML = '';},800);
}
function hideselects(){
	selects=document.body.getElementsByTagName('SELECT');
	numsels=selects.length;
	for (a=0;a<numsels;a++){
		if (selects[a].className!='replaced'){
			selects[a].style.visibility="hidden";
		}
	}
}

function showselects(){
        selects=document.body.getElementsByTagName('SELECT');
        numsels=selects.length;
        for (a=0;a<numsels;a++){
		if (selects[a].className!='replaced'){
	                selects[a].style.visibility="visible";
		}
        }
}


function postComment(){
	new Ajax.Updater('commentbuffer','servers/comment.php',{asynchronous:true,postBody:Form.serialize('commentform'),evalScripts:true,onSuccess:function(req){ new Insertion.Top('allcomments',req.responseText); new Effect.SlideDown($('allcomments').firstChild.id);$('couldbefirst').style.display='none';}});
}

function getAllArticles(type,div,start,ignore) {
	var ignorepb = '';
	if (ignore != undefined) ignorepb = '&ignore='+ignore;
	new Ajax.Updater(div,'servers/getarticles.php',{asynchronous: true, evalScripts: true, postBody: 'type='+type+'&start='+start+ignorepb,onSuccess: function () { new Effect.Appear(div);}});
}
