
nav = navigator.appName.substring(0,3);
ver = navigator.appVersion.substring(0,1)

function bookmark() 
{
 	var bookmarkurl="http://www.star-academy.info"
  	var bookmarktitle="www.Star-Academy.Info - Tous sur la Star Ac en France, Liban et Maghreb"
  	if(document.all) {
  		window.external.AddFavorite(bookmarkurl,bookmarktitle);
  	}
 }
  
function addFav()
{

	// alert(screen.width + "x" + screen.height);

	if (nav == "Mic" && ver >= 4)
	{
		url_site="http://www.star-academy.info";
		titre_site = "Star Academy";
		document.write('<A HREF="#" onClick="window.external.AddFavorite(url_site, titre_site);return(false);">Ajoute ce site <br>dans tes favoris</A><BR>')
	}
	else
	{
		document.write('Faites CTRL+D pour ajouter ce site &agrave; vos favoris!')
	}
}

function chg_frame (URI, Framename) {
  //parent[Framename].location.href = URI;
  window.open(URI, 'Framename');
}

function OpenComFenster (Adresse) { 
	ComFenster = window.open(Adresse, "Zweitfenster", "width=650,height=600,scrollbars=yes"); 
	ComFenster.moveTo(screen.width-605 , 5);
	ComFenster.focus(); 
} 

function OpenModFenster (Adresse) { 
	ModFenster = window.open(Adresse, "Drittfenster", "width=650,height=650,scrollbars=yes"); 
	ModFenster.moveTo(screen.width-655 , 5);
	ModFenster.focus(); 
} 

function news_reload(Link)
{
	//document.write('Link');
	window.open(Link, 'frame2', '');
}

function get_size()
{
	if (screen.width > 1919) 
	{
		ret = 6;
	}
	else if (screen.width > 1679) 
	{
		ret = 5;
	}
	else if (screen.width > 1279) 
	{
		if (screen.height > 1023)
		{
			ret = 4;
		}
		else if (screen.height > 799)
		{
			ret = 3;
		}
	}
	else if (screen.width > 1023)
	{
		ret = 1;
	}
	else if (screen.width > 799)
	{
		ret = 2;
	}
	else if (screen.width < 800)
	{
		ret = 0;
	}
	
	document.write( "$cols = " + ret + ";" );
}

function load_video(Video,Section)
{
	var Adresse = "http://www.star-academy.info/common/video_loader.php?video=" + Video + "&section=" + Section + "&postfix=.rm";
	var Fenster = window.open(Adresse,'','toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1, width=640, height=480');
	Fenster.focus();
	//Fenster.close();
}

function video_load(Video,Section,Postfix,skin,size,language)
{
	var Adresse = "http://www.star-academy.info/common/video_loader.php?video=" + Video + "&section=" + Section + "&postfix=" + Postfix + "&skin=" +skin + "&size=" + size + '&language=' + language;
	if (size < 3)
	{
		var Fenster = window.open(Adresse,'video','toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1, width=640, height=480, left=0, top=0');
		Fenster.moveTo(screen.width-635 , 5);
	}
	else
	{
		var Fenster = window.open(Adresse,'video','toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1, width=850, height=650, left=0, top=0');
		Fenster.moveTo(screen.width-845 , 5);
	}
	Fenster.focus();
	//Achtung, das Fenster in video_loader.php schliessen!!!!!!!
}


function start_impressum()
{
	window.open('impressum.htm','_blank','toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1, width=640, height=480, left=0, top=0');
}



function start_page(Page, Section)
{
	
	var Adresse = "http://www.star-academy.info/index_2008.php?page=" + Page + "&section=" + Section + "&skin=03";


	if (screen.width > 1919) 
	{
		var Adresse = Adresse + "&size=7";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1800, height=1050, left=0, top=0');
	}
	else if (screen.width > 1679) 
	{
		var Adresse = Adresse + "&size=5";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1550, height=920, left=0, top=0');
	}
	else if (screen.width > 1439) 
	{
		var Adresse = Adresse + "&size=6";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1340, height=800, left=0, top=0');
	}	

	else if (screen.width > 1279) 
	{
		if (screen.height > 1023)
		{
			var Adresse = Adresse + "&size=4";
			var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1200, height=900, left=0, top=0');
			// window.close();
		}
		else if (screen.height > 799)
		{
			var Adresse = Adresse + "&size=3";
			var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1249, height=699, left=0, top=0');
			// window.close();
		}
	}
	else if (screen.width > 1023)
	{
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1000, height=680, left=0, top=0');
		// window.close();
	}
	else if (screen.width > 799)
	{
		var Adresse = Adresse + "&size=2";
		window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=780, height=540, left=0, top=0');
		// window.close();
	}
	else if (screen.width < 800)
	{
		window.open('error_ecran.htm','_blank','toolbar=1, location=1, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=640, height=480, left=0, top=0');
	}
}

function start_page_2009(Page, Section, Adj)
{
	
	var Adresse = "http://www.star-academy.info/index_2008.php?page=" + Page + "&section=" + Section + "&skin=03" + "&" + Adj;


	if (screen.width > 1919) 
	{
		var Adresse = Adresse + "&size=7";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1800, height=1050, left=0, top=0');
	}
	else if (screen.width > 1679) 
	{
		var Adresse = Adresse + "&size=5";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1550, height=920, left=0, top=0');
	}
	else if (screen.width > 1439) 
	{
		var Adresse = Adresse + "&size=6";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1340, height=800, left=0, top=0');
	}	

	else if (screen.width > 1279) 
	{
		if (screen.height > 1023)
		{
			var Adresse = Adresse + "&size=4";
			var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1200, height=900, left=0, top=0');
			// window.close();
		}
		else if (screen.height > 799)
		{
			var Adresse = Adresse + "&size=3";
			var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1249, height=699, left=0, top=0');
			// window.close();
		}
	}
	else if (screen.width > 1023)
	{
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1000, height=680, left=0, top=0');
		// window.close();
	}
	else if (screen.width > 799)
	{
		var Adresse = Adresse + "&size=2";
		window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=780, height=540, left=0, top=0');
		// window.close();
	}
	else if (screen.width < 800)
	{
		window.open('error_ecran.htm','_blank','toolbar=1, location=1, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=640, height=480, left=0, top=0');
	}
}

function start_page_2010(Page, Section, Adj)
{
	
	var Adresse = "http://www.star-academy.info/index_2010.php?page=" + Page + "&section=" + Section + "&skin=04" + "&" + Adj;


	if (screen.width > 1919) 
	{
		var Adresse = Adresse + "&size=7";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1800, height=960, left=0, top=0');
	}
	else if (screen.width > 1679) 
	{
		var Adresse = Adresse + "&size=5";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1580, height=900, left=0, top=0');
	}
	else if (screen.width > 1439) 
	{
		var Adresse = Adresse + "&size=6";
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1340, height=800, left=0, top=0');
	}	

	else if (screen.width > 1279) 
	{
		if (screen.height > 1023)
		{
			var Adresse = Adresse + "&size=4";
			var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1200, height=900, left=0, top=0');
			// window.close();
		}
		else if (screen.height > 799)
		{
			var Adresse = Adresse + "&size=3";
			var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1240, height=660, left=0, top=0');
			// window.close();
		}
	}
	else if (screen.width > 1023)
	{
		var Neufenster = window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1000, height=650, left=0, top=0');
		// window.close();
	}
	else if (screen.width > 799)
	{
		var Adresse = Adresse + "&size=2";
		window.open(Adresse,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=780, height=510, left=0, top=0');
		// window.close();
	}
	else if (screen.width < 800)
	{
		window.open('error_ecran.htm','_blank','toolbar=1, location=1, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=640, height=480, left=0, top=0');
	}
}

function start1()
{
	window.open('index.php?size=1','_blank','toolbar=1, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1000, height=680, left=0, top=0');
}

function start2()
{
	window.open('index.php?size=2','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=780, height=540, left=0, top=0');
}

function start_HOME() 
{
	var Skin = '04';

	if (Skin != '') 
	{
		if (screen.width > 1919)
		{
			Url = '../index_2008.php?size=7&skin=' + Skin + '&section=HOME';
			var Neufenster = window.open(Url,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1800, height=960, left=0, top=0');
		}
		else if (screen.width > 1679)
		{
			Url = '../index_2008.php?size=5&skin=' + Skin + '&section=HOME';
			var Neufenster = window.open(Url,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1580, height=900, left=0, top=0');
		}
		else if (screen.width > 1439)
		{
			Url = '../index_2008.php?size=6&skin=' + Skin + '&section=HOME';
			var Neufenster = window.open(Url,'_blank','toolbar=0, location=0, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no, menuBar=no, width=1340, height=800, left=0, top=0');
		}
		else if (screen.width > 1279)
		{
			if (screen.height > 1023)
			{ 
				Url = '../index_2008.php?size=4&skin=' + Skin + '&section=HOME';
				var Neufenster = window.open(Url,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1200, height=900, left=0, top=0'); 
			}
			else if (screen.height > 799)
			{
				Url = '../index_2008.php?size=3&skin=' + Skin + '&section=HOME';
				var Neufenster = window.open(Url,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1240, height=660, left=0, top=0'); 
			}
		}
		else if (screen.width > 1023)
		{
			Url = '../index_2008.php?size=1&skin=' + Skin + '&section=HOME';
			var Neufenster = window.open(Url,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=1000, height=650, left=0, top=0'); 
		}
		else if (screen.width > 799)
		{
			Url = '../index_2008.php?size=2&skin=' + Skin + '&section=HOME';
			var Neufenster = window.open(Url,'_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=780, height=510, left=0, top=0'); 
		}
		else if (screen.width < 800)
		{
			var Neufenster = window.open('error_ecran.htm','_blank','toolbar=1, location=1, directories=0, status=1, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=640, height=480, left=0, top=0'); 
		}
	}

}