﻿
function anti2()
{
	win3 = window.open("vip.html", "AnTi", "top=" + ((screen.height) ? (screen.height-500)/2 : 0) + ",left="+((screen.width) ? (screen.width-567)/2 : 0)+"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=567,height=500");
}

function vip()
{
	win1 = window.open("TG/vip.php", "AnTi", "top=" + ((screen.height) ? (screen.height-500)/2 : 0) + ",left="+((screen.width) ? (screen.width-567)/2 : 0)+"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=567,height=500");
}

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 20 //set x offset of bar in pixels
var startY = 20 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


function sex() {
	if (confirm("שים לב, בעת אישור הודעה זו, אתה מצהיר שהינך בן 18+ וכל האחריות על התוכן המועבר עוברת אליך")) {
	return true;
	} else {
	return false;
	}
}

function down(id,site) {
if (confirm("שים לב, זוהי סיסמא לאתר:\n"+site+"\n האם אתה בטוח כי ברצונך לקחת סיסמא לאתר זה?\nאין באפשרותך להתחרט לאחר הלקיחה!")) {
	window.location='download.php?id='+id;
}
}


function setHomepage()
{
 if (document.all)
    {
        document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage('http://www.freeff.co.il');
 
    }
    else if (window.sidebar)
    {
    if(window.netscape)
    {
         try
   {  
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }  
         catch(e)  
         {  
    alert("פעולה זה הופסקה על ידי הדפדפן שלך אם אתה רוצה להפעיל אותה אנא כנס ל about:config בשורת הכתובות ושנה את הערך של signed.applets.codebase_principal_support למאושר");  
         }
    } 
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage','http://www.freeff.co.il');
 }
}

function error(id,color,size,bui,text) {

var text2="<font color=" + color + " size=" + size + "><" + bui + ">" + text + "</" + bui + "></font>";

document.getElementsByName(id)[0].innerHTML=text2;

}


function CreateBookmarkLink() {

 title = "Free FileFlyer - סיסמאות חינם לFileFlyer ולמגוון שרתים נוספים"; 

 url = "http://www.freeff.co.il";


	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { 
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { 
		return true; }
 }

function Set_Cookie( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );

}

function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}


function Get_Cookie( check_name ) {
	// first we'll split this cookie up into name/value pairs
	// note: document.cookie only returns name=value, not the other components
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false; // set boolean t/f default f

	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		// now we'll split apart each name=value pair
		a_temp_cookie = a_all_cookies[i].split( '=' );


		// and trim left/right whitespace while we're at it
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');

		// if the extracted name matches passed check_name
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			// we need to handle case where cookie has no value but exists (no = sign, that is):
			if ( a_temp_cookie.length > 1 )
			{
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}
			// note that in cases where cookie is initialized but no value, null is returned
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}
	if ( !b_cookie_found )
	{
		return null;
	}
}

function test55(name) {
	if(Get_Cookie(name)) {
	changeText();
	}
}

function se() {
	if (confirm("שים לב בלחיצה על אישור, כל תכני המבוגרים בלבד יעלמו מהאתר \n על מנת להחזיר אותם יש למחוק קוקיס \n האם אתה בטוח כי ברצונך למחוק את כל תכני המבוגרים מהאתר?")) {
	Set_Cookie('tvsex','1','9999');
	changeText();
	}
}

function changeText(){

document.getElementById('bama').innerHTML='<a href="http://www.root.co.il" target="_blank"><span style="color: red;">קהילת פורומים רוט</span></a>';

}

function removeAd(){
for(i=1;i<6;i++) {
	document.getElementById('ad'+i).style.display = 'none';
}
}

function alerter1() {
	if(Get_Cookie("alertmusic")) {
	Delete_Cookie("alertmusic");
	alert("ההתראה המוזיקלית פעילה כעת");
	} else {
	Set_Cookie('alertmusic','1','9999');
	alert("ההתראה המוזיקלית אינה פעילה כעת\nלהפעלה מחדש לחץ על כפתור זה שוב");
	}
}
function alerter2() {
	if(Get_Cookie("alertalert")) {
	Delete_Cookie("alertalert");
	alert("ההתראה על ידי ההודעה קופצת פעילה כעת");
	} else {
	Set_Cookie('alertalert','1','9999');
	alert("ההתראה על ידי ההודעה קופצת אינה פעילה כעת\nלהפעלה מחדש לחץ על כפתור זה שוב");
	}
}

function checkTg(secid,nameid,msgid) {
var k;
if(secid) {
	k=document.getElementById(secid).value;
	if(k.length != 6) { alert("קוד אבטחה שגוי");return false; }
	if(isNaN(k)== true) { alert("קוד אבטחה שגוי");return false; } 
}

if(nameid) {
	k=document.getElementById(nameid).value;
	if(k.length < 2) { alert("שם קצר מידי");return false; }
	if(k == "") { alert("הכנס שם");return false; } 
}


if(msgid) {
	k=document.getElementById(msgid).value;
	if(k.length < 4) { alert("תגובה קצרה מידי");return false; }
	if(k == "") { alert("לא הכנסת תגובה");return false; } 
	if(k.length > 1000) { alert("תגובה ארוכה מידי");return false; }
}
return true;
	
}


function checkBoxTest(){
	var sites="";var string="";var count=0;

var odd=""
if(document.getElementById('voice1').checked == 1) {
var fe = document.getElementById('female').checked;
odd="התראה קולית פעילה בקול של: ";
	if (fe == true) {
		string = "female|";odd=odd+"נקבה";
	} else {
		string = "male|";odd=odd+"זכר";
	}
odd=odd+"\n";
} else { string="no|";odd="התראה קולית אינה פעילה\n"; }

if(document.getElementById('alrt1').checked == 1) {
string = string+"ok";odd=odd+"הודעה קופצת (כמו זו) פעילה";
} else { string = string+"no";odd=odd+"הודעה קופצת (כמו זו) אינה פעילה"; }

Set_Cookie('alerter', string, '9999');
alert('השינויים נשמרו בהצלחה, אתה כעת בחרת ב\n'+odd);
la('ajx');
return false;
}


function la(id) {
	Object = document.getElementById(id);
	Object.style.display = Object.style.display == "none" ? "" : "none";
}

