			var myWidth = 0, myHeight = 0; screenWidth=0; screenHeight =0; 
			var mainHeight = 0; mainWidth =0; mainLeft=0; menuWidth=0;
			//var bannerWidth = 0, bannerHeight = 0, bannerTop=0, bannerLeft=0; 
			var divtop = 0; menutop =0;menuheigth =0; labeltop=0; 
			var	logoWidth = 0; logoHeight=0;
			var lineTop = 0; lineLeft = 0, lineWidth =0, lineHeight = 0;
			var	loadingleft = 0; loadingtop=0;loadingWidth = 0; loadingHeight=0;
			var	videoWidth = 0; videoHeight=0; videoTop=0; videoLeft=0;
			var newsHeight = 0, newsTop=0;
			var imgDivHeight=0, imgDivTop =0;
			var xcareImgHeight =0, xcareImgWidth =0, xcareLeft=0,xcareTop=0;
			
			
			var logopath="home page/logo.png";
			var homepagepath="home page/homepage.png";
			var loadingpath="pics/loading/loadingnew.gif";
			var xcarepath="x-care3/xcare.png";
			var menupath ="home page/cadre/gris2.png";
			var linepath ="home page/cadre/line.png";
			var machinepath ="x-care3/xcareMachine.png";
			var newspath ="x-care3/news.png";
			var previouspath ="pics/icons/back.png";
			var pausepath ="pics/icons/pause.png";
			var playpath ="pics/icons/play.png";
			var nextpath ="pics/icons/next.png";
			var link="createhome";
			var xcarelink="";
			
			
			var x,y,x1,y1;
			var LoadingVisibility = "visible";
			var MainVisibility = "hidden";
			
			var mx1, mx2, my1, my2= 0;
			var vx1, vx2, vy1, vy2= 0;
			var bx1, bx2, by1, by2= 0;
			var px1, px2, py1, py2= 0;
						
			var url = "http://www.axxon.us/";
			var xcare3URL = "x-care3/site/";
			
			var im1 = "xenon-krypton1.png";
			var im2 = "technical-spec.png";
			var im3 = "menus-detail.png";
			var im4 = "hand-piece.png";
			var im5 = "network.png";
			var im6 = "treatment.png";
			var im7 = "download.png";
			
			
			
			var state=1;
			
			var Xcare_a=new Array("a1","a2","a3","a4","a5","a6","a7","a8");
			var newslinks=new Array();
			var newstexts = new Array();
			var newsheads = new Array();
			
			var nIndex=-1;
				 
			
		/*	newslinks[0] = "http://www.alaan.tv/show/heyakom";
			newsheads[0] = "Alaan TV";
  			newstexts[0] = "The TV program 'Heyakom' shown on “Alaan TV” has introduce the Axxon X-Care3 machine. Demos for facial treatments will be performed with all the necessary information.On March and April, you can watch the movie every day at 11:00 KSA and the rerun at 00:00 KSA.";*/
			
		
			
			newslinks[0] = "http://www.inshapefair.com";
			newsheads[0] = "In Shape Fair";
			newstexts[0] = "Meet us in The 2012 edition of In-Shape held in Beirut,Special Offers on the X-care3 Machine";

				 
  			newslinks[1] = "http://www.beautyworldme.com";
			newsheads[1] = "Trade Fair";
  			newstexts[1] = "Axxon Will take part of the beautyworld Middle east from 29 to 31 May 2012 at dubai International convention & exhibition centre,UAE ";

			
			function setopacity(img, op){
				var elem = document.getElementById(img);
				elem.style.opacity = op;
				elem.style.filter = "alpha(opacity=" + op*100 + ")";
				}			
		
		
		
			
			/*function fadeItMenu() {
			var fadeArgs = {
                    node: "MENUDIV",
                    duration: 900
                };
                dojo.fadeInCustom(fadeArgs).play();
			}
     		
			function fadeOutMenu() {
             /*   var fadeArgs = {
                    node: "MENUDIV",
                    duration: 900
                };
                dojo.fadeOutCustom(fadeArgs).play();
            }*/
			
		//////////////// DOJO FADE FUCNTIONS
			/*function fadeItMain() {
                var fadeArgs = {
                    node: "MAIN",
                    duration: 500
                };
                dojo.fadeIn(fadeArgs).play();
            }
			function fadeOutMain() {
                var fadeArgs = {
                    node: "MAIN",
                    duration: 400
                };
                dojo.fadeOut(fadeArgs).play();
            }*/
		////////////////	
			
			
			
					
			function transition(image){
				document.getElementById('MAIN').innerHTML = image;
				//setTimeout("setopacity('MAIN',1)",110);
				//fadeItMain();
			}
		
		
		
		//////////////// RESIZE FUNCTION		
			function getSize(){
			if( typeof( window.innerWidth ) == 'number' ) {
				//Non-IE
				myWidth = window.innerWidth;
				myHeight = window.innerHeight;
			  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
				//IE 6+ in 'standards compliant mode'
				myWidth = document.documentElement.clientWidth;
				myHeight = document.documentElement.clientHeight;
			  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			  }
			  //window.alert( 'Width = ' + myWidth );
			  //window.alert( 'Height = ' + myHeight );
			  //alert('screen width =' +screen.width);
			 
			screenWidth = screen.width;
          	screenHeight = screen.height;	
			
			logoWidth = 220;
			logoHeight = 90;
			
			if ((screenWidth / screenHeight) < 1.4) {
				mainWidth = 953;
				mainHeight = 700;
				
				if (myWidth>(mainWidth + (logoWidth/2))) {
					logoHeight = logoHeight*(myHeight /screenHeight);
					logoWidth = logoWidth * (myHeight /screenHeight);	
					if (logoHeight < 120) {
						logoHeight = 120;
						logoWidth = 280;
					}	
				}
				else{						
					logoWidth = logoWidth * (myWidth/ (mainWidth+ (logoWidth)));
					logoHeight = logoHeight * (myWidth/(mainWidth+ (logoWidth)));
				
					if (logoWidth < 200){						
						logoHeight = 200 * 120 /280;
						logoWidth = 200;
					}			
			}			
			}
			else {
				mainWidth = 1067;
				mainHeight = 600;
				
				if (myHeight > mainHeight) {
					logoHeight = 105*(myHeight /mainHeight);
					logoWidth = 250 * (myHeight /mainHeight);		
				}
			}			
			divtop=0;						
			if ((screenWidth / screenHeight )< 1.4){ 
				//alert("4:3")
				if ((((myWidth - logoWidth) / myHeight) < 1.4)) {
					//alert("main 4:3");
					if (myWidth > mainWidth) {
					//	alert("my width > 670");
						mainWidth = myWidth - (logoWidth / 2);
						mainHeight = (mainWidth * 9) / 16;
						var white = (myHeight - mainHeight);
						divtop = white / 2;
					}
					else  if (myWidth < mainWidth) {
						//	alert("my width < 953");
							mainWidth = mainWidth - (logoWidth / 2);
							mainHeight = (mainWidth * 9) / 16;
							var white = (myHeight - mainHeight);
							divtop = white / 2;
						}
				}
				else
					//alert("main 16:9"); 
					if ((((myWidth - logoWidth) / myHeight) > 1.4)) {
						if (myHeight > mainHeight) {		
						mainHeight = myHeight-10;
						mainWidth = (mainHeight * 16) / 9;
						}
						else if (myHeight < mainHeight){
							mainHeight = (mainWidth*9)/ 16;				
						}
					}					
			}
					
			else {
				if (myHeight > mainHeight) {
					mainHeight = myHeight;
					mainWidth = (mainHeight * 16) / 9;
				}
			}
			menuWidth = myWidth-4;
			if (menuWidth <mainWidth) {menuWidth =mainWidth;}	
			
			mainLeft = (screenWidth - mainWidth) - (screenWidth - myWidth);			
			if (mainLeft  <0) {mainLeft = 0;}
			
			//alert(mainWidth);
			//alert(mainHeight);

					
			menutop = mainHeight - 100 + divtop;
			menuheigth = 60;
			labeltop = 18;	
			newsHeight=menutop - logoHeight - divtop - 140;
			newsTop = divtop+logoHeight +5;	
			imgDivHeight = menutop - logoHeight - divtop - 10 - newsHeight;
			imgDivTop = newsTop + newsHeight ;		
			
			lineTop = 0;
			lineLeft = logoWidth-15;
			lineWidth =25, lineHeight = menuheigth-2;
			
			
			loadingWidth = 90; 
			loadingHeight= 90;
			loadingleft = logoWidth+ ((myWidth - logoWidth)/2);//mainLeft + (mainWidth/2); 
			loadingtop= (mainHeight/2) - (logoHeight/2) - (mainHeight - menutop) + 45;
			
			xcareImgHeight =130; xcareImgWidth =180;
			xcareLeft = (logoWidth - xcareImgWidth)/2; xcareTop = (imgDivHeight - xcareImgHeight)/2;
			
			
			mx1 = ((34 / 67.5) * mainWidth) ;
			my1 = ((9 / 36) * mainHeight) ;
			mx2 = ((42 / 67.5) * mainWidth);
			my2 = ((17 / 36) * mainHeight) ;
			
			vx1 = ((24 / 67.5) * mainWidth) ;
			vy1 = ((9 / 36) * mainHeight) ;
			vx2 = ((31 / 67.5) * mainWidth);
			vy2 = ((17 / 36) * mainHeight) ;


			bx1 = ((34 / 67.5) * mainWidth) ;
			by1 = ((18 / 36) * mainHeight) ;
			bx2 = ((42 / 67.5) * mainWidth);
			by2 = ((26 / 36) * mainHeight) ;
			
			px1 = ((24 / 67.5) * mainWidth) ;
			py1 = ((18 / 36) * mainHeight) ;
			px2 = ((31 / 67.5) * mainWidth);
			py2 = ((26 / 36) * mainHeight) ;

			setbody();
			}			
		///////////////	
		
		
		
		/////////////// SET BODY FUNCTION
			function setbody(){
			document.getElementById('bodyDiv').innerHTML="<DIV id='LOGO' style='position:absolute;width:"+logoWidth+"px;height:"+logoHeight+"px;left:0px;top:"+divtop+"px;z-index:1;'>"+
			"<IMG src='"+logopath+"' id='logo' width= 100% height=100% ></DIV>"+
			"<DIV id='Loading' style='overflow:hidden;visibility:"+LoadingVisibility+";position:absolute;left:"+loadingleft+"px;top:"+loadingtop+"px;width:"+loadingWidth+"px;height:"+loadingHeight+"px;z-index:0;opacity:1;filter:alpha(opacity=100)'>"+			
			"<IMG src='"+loadingpath+"' id='homeImg' width= 100% height=100%></DIV>"+
			"<DIV id='MAIN' style='overflow:hidden;visibility:"+MainVisibility+";position:absolute;left:"+mainLeft+"px;top:"+divtop+"px;width:"+mainWidth+"px;height:"+mainHeight+"px;z-index:0;opacity:1;filter:alpha(opacity=100)'>"+			
			"<IMG src='"+homepagepath+"' id='homeImg' width= 100% height=100%></DIV>"+
			"<Div id='NewsDiv' style='overflow:hidden;position:absolute;width:"+logoWidth+"px;height:"+newsHeight+"px;left:0px;top:"+(divtop+logoHeight +5)+"px;z-index:2;'>"+
			"<img src='"+newspath+"' width= 100% height=100%>"+		
			"<div id='vmarquee' style='position:absolute;overflow:hidden;width:"+0.8*logoWidth+"px;left:10%;top:2%'>"+			
			//"<h4 style='text-align:center'>"+newsheads[nIndex]+"</h4><a href="+newslinks[nIndex]+">"+ newstexts[nIndex]+"</a>"+
			"</div>"+
			"<div id='icons' style='position:absolute;overflow:hidden;width:"+0.8*logoWidth+"px;height:20%;left:10%;top:"+(newsHeight-(0.2*newsHeight))+"px'>"+
			"<img src='"+previouspath+"' id='previousButt' onmouseover='setopacity(&#39previousButt&#39, 0.9)' onmouseout='setopacity(&#39previousButt&#39, 0.3)' onmousedown='prevNews();' />"+
			"<img src='"+pausepath+"' id='PauseButt' onmouseover='setopacity(&#39PauseButt&#39, 0.9)' onmouseout='setopacity(&#39PauseButt&#39, 0.3)' onmousedown='pause();setplay();' />"+
			"<img src='"+playpath+"' id='PlayButt' onmouseover='setopacity(&#39PlayButt&#39, 0.9)' onmouseout='setopacity(&#39PlayButt&#39, 0.3)' onmousedown='resume();setpause();' />"+
			"<img src='"+nextpath+"' id='nextButt' onmouseover='setopacity(&#39nextButt&#39, 0.9)' onmouseout='setopacity(&#39nextButt&#39, 0.3)' onmousedown='nextNews();' />"+
			"</div></Div>"+
			"<Div id='imgDiv' style='overflow:hidden;position:absolute;width:"+logoWidth+"px;height:"+imgDivHeight+"px;left:0px;top:"+imgDivTop+"px;z-index:2;'>"+
			"<a href='#' onclick='createXcare3Home()'><img src='"+machinepath+"' style='position:absolute;width:"+xcareImgWidth+"px;height:"+xcareImgHeight+"px;border:0;left:"+xcareLeft+"px;top:"+xcareTop+"px'/></a>"+
			"</Div>"+
			"<DIV id='MENUDIV' style='overflow:hidden;position:absolute;left:0px;top:"+menutop+"px;width:"+menuWidth+"px;height:"+menuheigth+"px;z-index:3;opacity:0.8;filter:alpha(opacity=80)'></Div>";
			//"<DIV id='Banner' style='overflow:hidden;position:absolute;left:"+bannerLeft+"px;top:"+bannerTop+"px;width:"+bannerWidth+"px;height:"+bannerHeight+"px;z-index:5;opacity:0.4;filter:alpha(opacity=40);background-color:#222222'></Div>";				
			}
		///////////////	
			
			
		/////////////// HOMEPAGE FUNCTIONS	
			function createBody(){
			link="createhome";	
			document.getElementById('MENUDIV').innerHTML= 			
			"<IMG src='"+menupath+"' id='ImgMenu' width='100%' height='100%'/>"+			
			"<div id='menu1' style='z-index:3;'>"+
			"<IMG src='"+linepath+"' id='Imgline' style='overflow:hidden;position:absolute;left:"+lineLeft+"px;top:"+lineTop+"px;width:"+lineWidth+"px;height:"+lineHeight+"px;z-index:3;'/>"+
			"<a href='#' id='labelHome' class='current_page_item' style='overflow:hidden;position:absolute;left:10%;top:"+labeltop+"px;z-index:3;' onmousedown='createHome()'>Home</a>"+
			"<a href='#' id='labelAbout' style='overflow:hidden;position:absolute;left:25%;top:"+labeltop+"px;;z-index:3;' onmousedown='createAboutUs()'>About us</a>"+
			"<a href='#' id='labelProducts' style='overflow:hidden;position:absolute;left:38%;top:"+labeltop+"px;;z-index:3;' onmousedown='createProducts()'>Products</a>"+
			"<a href='#' id='labelBuy' style='overflow:hidden;position:absolute;left:51%;top:"+labeltop+"px;;z-index:3;' onmousedown='createBuy()' >Buy credits</a>"+
			"<a href='#' id='labelContact' style='overflow:hidden;position:absolute;left:68%;top:"+labeltop+"px;;z-index:3;' onmousedown='createContact()' >Contact us</a>"+
			"<a href='#' id='labelSitemap' style='overflow:hidden;position:absolute;left:83%;top:"+labeltop+"px;;z-index:3;' onmousedown='createSitemap()'>Sitemap</a></div>";	
			}			
			function createHome(){
			link= "home";
			div = document.getElementById("MENUDIV");			
			div.style.height = '60px';	
			lineHeight = 58;		
			div.innerHTML = 
			"<IMG src='"+menupath+"' id='ImgMenu' width='100%' height='100%'/>"+
			"<div id='menu1' style='z-index:3;'>"+
			"<IMG src='"+linepath+"' id='Imgline' style='overflow:hidden;position:absolute;left:"+lineLeft+"px;top:"+lineTop+"px;width:"+lineWidth+"px;height:"+lineHeight+"px;z-index:3;'/>"+
			"<a href='#' id='labelHome' class='current_page_item' style='overflow:hidden;position:absolute;left:10%;top:"+labeltop+"px;z-index:3;' onmousedown='createHome()'>Home</a>"+
			"<a href='#' id='labelAbout' style='overflow:hidden;position:absolute;left:25%;top:"+labeltop+"px;z-index:3;' onmousedown='createAboutUs()'>About us</a>"+
			"<a href='#' id='labelProducts' style='overflow:hidden;position:absolute;left:38%;top:"+labeltop+"px;z-index:3;' onmousedown='createProducts()'>Products</a>"+
			"<a href='#' id='labelBuy' style='overflow:hidden;position:absolute;left:51%;top:"+labeltop+"px;z-index:3;' onmousedown='createBuy()' >Buy credits</a>"+
			"<a href='#' id='labelContact' style='overflow:hidden;position:absolute;left:68%;top:"+labeltop+"px;z-index:3;' onmousedown='createContact()' >Contact us</a>"+
			"<a href='#' id='labelSitemap' style='overflow:hidden;position:absolute;left:83%;top:"+labeltop+"px;z-index:3;' onmousedown='createSitemap()'>Sitemap</a></div></Div>";	
			}			
			function returnHome(){
			//fadeOutMain();
			
			preload(url+homepagepath);
			
			elem = document.getElementById('NewsDiv');
			elem.style.visibility = 'visible';
			elem = document.getElementById('imgDiv');
			elem.style.visibility = 'visible';
			
			if (state == 0) {
				document.getElementById('PlayButt').style.visibility = 'visible';
				document.getElementById('PauseButt').style.visibility = 'hidden';
			}
			else {
				document.getElementById('PauseButt').style.visibility = 'visible';
				document.getElementById('PlayButt').style.visibility = 'hidden';
			}
			
			transition("<IMG src='"+homepagepath+"' id=home width= 100% height= 100%;>");
			//setTimeout('transition(\'<IMG src="'+homepagepath+' " id=home width= 100% height= 100%;>\')',400);
			xcarelink="";						
			}
			function createAboutUs(){
				transition("<IMG src='"+homepagepath+"' id=home width= 100% height= 100%;>");
			link="About us";
			div = document.getElementById("MENUDIV");			
			div.style.height = '100px';
			lineHeight = 98;	
			div.innerHTML = 
			"<IMG src='"+menupath+"' id='ImgMenu' width='100%' height='100%'/>"+
			"<IMG id='back' src='home page/back.png' style='overflow:hidden;position:absolute;left:6px;top:20px;width:60px;height:58px;' onclick='createHome()' onMouseOver='backRollover()' onmouseout='backInitial()'/>"+
			"<div id='menu1'>"+
			"<IMG src='"+linepath+"' id='Imgline' style='overflow:hidden;position:absolute;left:"+lineLeft+"px;top:"+lineTop+"px;width:"+lineWidth+"px;height:"+lineHeight+"px;z-index:3;'/>"+
			"<a href='#' class='current_page_item' style='overflow:hidden;position:absolute;top:41%;left:10%;"+labeltop+"px;z-index:3;'>About us</a>"+
			"<div id='aboutUs'>Created by a group of professional with a strong background in both medical and "+
			"power electronics field, aXXon company was able to offer very highly sophisticated equipments for medical and paramedical applications. Research and "+
			"Development on Xenon and Kryptopn arc lamps allowed the company to offer universal equipmnents. The innumerable innovations of aXXon's technologies "+
			"contribute to a strong feeling of satisfaction approved by both patients and practitioners. </div>"+
			"</div>";			
			}
			function createBuy(){
				transition("<IMG src='"+homepagepath+"' id=home width= 100% height= 100%;>");
			link="Buy credits";
			div = document.getElementById("MENUDIV");			
			div.style.height = '100px';	
			lineHeight = 98;	
			div.innerHTML = 
			"<IMG src='"+menupath+"' id='ImgMenu' width='100%' height='100%'/>"+
			"<div id='menu1' style='z-index:3;'>"+
			"<IMG src='"+linepath+"' id='Imgline' style='overflow:hidden;position:absolute;left:"+lineLeft+"px;top:"+lineTop+"px;width:"+lineWidth+"px;height:"+lineHeight+"px;z-index:3;'/>"+
			"<a href='#' id='labelHome' style='overflow:hidden;position:absolute;left:10%;top:"+labeltop+"px;z-index:3;' onmousedown='createHome()'>Home</a>"+
			"<a href='#' id='labelAbout' style='overflow:hidden;position:absolute;left:25%;top:"+labeltop+"px;;z-index:3;' onmousedown='createAboutUs()'>About us</a>"+
			"<a href='#' id='labelProducts' style='overflow:hidden;position:absolute;left:38%;top:"+labeltop+"px;;z-index:3;' onmousedown='createProducts()'>Products</a>"+
			"<a href='#' id='labelBuy' class='current_page_item' style='overflow:hidden;position:absolute;left:51%;top:"+labeltop+"px;;z-index:3;' onmousedown='createBuy()' >Buy credits</a>"+
			"<a href='#' id='labelContact' style='overflow:hidden;position:absolute;left:68%;top:"+labeltop+"px;;z-index:3;' onmousedown='createContact()'>Contact us</label>"+
			"<a href='#' id='labelSitemap' style='overflow:hidden;position:absolute;left:83%;top:"+labeltop+"px;;z-index:3;' onmousedown='createSitemap()'>Sitemap</a>"+
			"<table style='overflow:hidden;position:absolute;left:51%;top:36%;z-index:3;font:bold italic 0.75em arial;color:#666666'><tr>"+
			"<td>Username :</td>"+	
			"<td><input type='text'onclick='custclear()' style='width:100px;height:14px;'/></td>"+
			"<td><img src='pics/login.png' onmouseover='this.src=&#39pics/login_hover.png&#39'  onmouseout='this.src=&#39pics/login.png&#39' onclick='customerlogin()'></td></tr>"+
			"<tr><td>Password :</td>"+
			"<td><input type='password' onclick='custclear()' style='width:100px;height:14px;'/></td>"+
			"<td id='authDiv' style='font:bold italic 1em arial;color:#FF0000'></td></tr></table>"+
			"</div>";			
			}
			function createProducts(){
				transition("<IMG src='"+homepagepath+"' id=home width= 100% height= 100%;>");
			link="Products";	
			div = document.getElementById("MENUDIV");			
			div.style.height = '100px';	
			lineHeight = 98;	
			div.innerHTML = 
			"<IMG src='"+menupath+"' id='ImgMenu' width='100%' height='100%'/>"+
			"<div id='menu1' style='z-index:3;'>"+
			"<IMG src='"+linepath+"' id='Imgline' style='overflow:hidden;position:absolute;left:"+lineLeft+"px;top:"+lineTop+"px;width:"+lineWidth+"px;height:"+lineHeight+"px;z-index:3;'/>"+
			"<a href='#' id='labelHome' style='overflow:hidden;position:absolute;left:10%;top:"+labeltop+"px;z-index:3;' onmousedown='createHome()'>Home</a>"+
			"<a href='#' id='labelAbout' style='overflow:hidden;position:absolute;left:25%;top:"+labeltop+"px;z-index:3;' onmousedown='createAboutUs()'>About us</a>"+
			"<a href='#' id='labelProducts' class='current_page_item' style='overflow:hidden;position:absolute;left:38%;top:"+labeltop+"px;;z-index:3;' onmousedown='createProducts()'>Products</a>"+
			"<a href='#' id='labelBuy' style='overflow:hidden;position:absolute;left:51%;top:"+labeltop+"px;z-index:3;' onmousedown='createBuy()' >Buy credits</a>"+
			"<a href='#' id='labelContact' style='overflow:hidden;position:absolute;left:68%;top:"+labeltop+"px;z-index:3;' onmousedown='createContact()' >Contact us</a>"+
			"<a href='#' id='labelSitemap' style='overflow:hidden;position:absolute;left:83%;top:"+labeltop+"px;z-index:3;' onmousedown='createSitemap()'>Sitemap</a>"+
			"<table id='productsTable' style='overflow:hidden;position:absolute;left:37%;top:45px;z-index:3;' cellspacing=10 >"+
			"<tr>"+			
			"<td><a href='#' onclick='createXcare3Home()'>X-care3</a></td>"+
			"<td><a href='#' onclick='productsMessage()'>X-care2</a></td>"+			
			"<td><a href='#' onclick='productsMessage()'>X-care1</a></td>"+
			"<td><a href='#' onclick='productsMessage()'>Other</a></td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>"+
			"<td id='prodMessage' style='font:bold italic 0.8em arial;color:#FF0000'></td></tr></table>"+
			"</div>";			
			}
			function createContact(){
				transition("<IMG src='"+homepagepath+"' id=home width= 100% height= 100%;>");
			link="Contact us";
			div = document.getElementById("MENUDIV");			
			div.style.height = '100px';	
			lineHeight = 98;	
			div.innerHTML = 
			"<IMG src='"+menupath+"' id='ImgMenu' width='100%' height='100%'/>"+
			"<div id='menu1' style='z-index:3;'>"+
			"<IMG src='"+linepath+"' id='Imgline' style='overflow:hidden;position:absolute;left:"+lineLeft+"px;top:"+lineTop+"px;width:"+lineWidth+"px;height:"+lineHeight+"px;z-index:3;'/>"+
			"<a href='#' id='labelHome' style='overflow:hidden;position:absolute;left:10%;top:"+labeltop+"px;z-index:3;' onmousedown='createHome()'>Home</a>"+
			"<a href='#' id='labelAbout' style='overflow:hidden;position:absolute;left:25%;top:"+labeltop+"px;z-index:3;' onmousedown='createAboutUs()'>About us</a>"+
			"<a href='#' id='labelProducts' style='overflow:hidden;position:absolute;left:38%;top:"+labeltop+"px;z-index:3;' onmousedown='createProducts()'>Products</a>"+
			"<a href='#' id='labelBuy' style='overflow:hidden;position:absolute;left:51%;top:"+labeltop+"px;z-index:3;' onmousedown='createBuy()' >Buy credits</a>"+
			"<a href='#' id='labelContact'class='current_page_item' style='overflow:hidden;position:absolute;left:68%;top:"+labeltop+"px;;z-index:3;' onmousedown='createContact()' >Contact us</a>"+
			"<a href='#' id='labelSitemap' style='overflow:hidden;position:absolute;left:83%;top:"+labeltop+"px;z-index:3;' onmousedown='createSitemap()'>Sitemap</a>"+	
			"<table style='overflow:hidden;position:absolute;left:68%;top:38px;z-index:3;color:#666666;font:bold italic 0.8em arial,sans-serif;' cellspacing=3 >"+
			"<tr>"+
			"<td>Tel: +1.305.720.10</td></tr>"+
			"<tr><td><a href='mailto:contact@aXXon.us' style='font:bold italic 1em arial,sans-serif;'>Email: contact@aXXon.us</a></td>"+			
			"</tr></table>"+			
			"</div>";			
			}
			function createSitemap(){
				link = "sitemap" ;
								
				div = document.getElementById('MAIN');
				var str = "";
				str+= "<div id='sitemapDIV' style='	margin:0px 20px 75px 300px; width: 655px; height: 470px; border:double #ffffff;'>";
				
				str+="<div style='display:inline-block;float:left;height: 60px;width:655px;'></div>"
					
				str+="<div class='sitemaprow'>"				
				str+="<div style='margin: 0 auto;height:26px;width:131px;text-align:center;background-image:url(&#39pics/Sitemap_hover.gif&#39);padding-top: 4px;'>"
				str+="<a href='#'onmousedown='setbody();createBody()'>Home</a>";
				str+="</div>";
				str+="</div>";
				str+="<div style='display:inline-block;float:left;height: 10px;width: 655px;'></div>"
				str+="<div class='sitemaprow'>"												
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='#' onmousedown='createAboutUs()'>About us</a></div>"
				str+="<div class='sitemapdiv2'><a href='#' onmousedown='createProducts()'>Products</a></div>"
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='#'  onmousedown='createBuy()'>Buy credits</a></div>"
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='#' onmousedown='createContact()' >Contact us</a></div>"
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='#'>Sitemap</a></div>"			
				str+="</div>";
				
				str+="<div style='display:inline-block;float:left;height: 10px;width: 655px;'></div>"
				
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='#'  onclick='createProducts();productsMessage()'>Other</a></div>"
				str+="</div>";
				
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='#'  onclick='createProducts();productsMessage()'>X-care1</a></div>"
				str+="</div>";
				
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='#'  onclick='createProducts();productsMessage()'>X-care2</a></div>"
				str+="</div>";
				
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv2'><a id='a8p' href='#' onclick='createXcare3Home()'>X-care3</a></div>"				
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a id='a2p' href='#' onmousedown='createXcare3Menu();create(&#39"+im1+"&#39)'>Xenon Krypton</a></div>"
				str+="</div>";	
							
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv3'></div>"			
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a id='a3p' href='#' onmousedown='createXcare3Menu();create(&#39"+im2+"&#39)'>Technical specs</a></div>"
				str+="</div>";
				
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv3'></div>"			
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a id='a4p' href='#' onmousedown='createXcare3Menu();create(&#39"+im3+"&#39)'>Menu details</a></div>"
				str+="</div>";
					
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv3'></div>"			
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a id='a5p' href='#' onmousedown='createXcare3Menu();create(&#39"+im4+"&#39)'>Hand piece</a></div>"
				str+="</div>";
					
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv3'></div>"			
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a id='a6p' href='#' onmousedown='createXcare3Menu();create(&#39"+im5+"&#39)'>Network</a></div>"
				str+="</div>";
						
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv3'></div>"			
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a id='a7p' href='#' onmousedown='createXcare3Menu();create(&#39"+im6+"&#39)'>Treatements</a></div>"
				str+="</div>";
						
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv3'></div>"			
				str+="<div class='sitemapdiv2'><a id='a8p' href='#' onmousedown='createXcare3Menu();create(&#39"+im7+"&#39)'>Downloads</a></div>"		
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='javascript:setVideo()' ALT='Download Video''>Video</a></div>"
				str+="</div>";		
				
				str+="<div class='sitemaprow'>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv3'></div>"
				str+="<div class='sitemapdiv3'></div>"		
				str+="<div class='sitemapdiv1' onmouseover='this.style.backgroundImage =&#39url(pics/Sitemap_hover.gif)&#39'  onmouseout='this.style.backgroundImage =&#39url(pics/Sitemap.gif)&#39'><a href='brochure.pdf' >Brochure</a></div>"
				str+="</div>";		
						
				
				str+="</div>";
				div.innerHTML = str;
			
				div = document.getElementById("MENUDIV");			
				div.style.height = '60px';	
				lineHeight = 58;		
				div.innerHTML = 
				"<IMG src='"+menupath+"' id='ImgMenu' width='100%' height='100%'/>"+
				"<div id='menu1' style='z-index:3;'>"+
				"<IMG src='"+linepath+"' id='Imgline' style='overflow:hidden;position:absolute;left:"+lineLeft+"px;top:"+lineTop+"px;width:"+lineWidth+"px;height:"+lineHeight+"px;z-index:3;'/>"+
				"<a href='#' id='labelHome' class='current_page_item' style='overflow:hidden;position:absolute;left:10%;top:"+labeltop+"px;z-index:3;' onmousedown='createHome()'>Home</a>"+
				"<a href='#' id='labelAbout' style='overflow:hidden;position:absolute;left:25%;top:"+labeltop+"px;z-index:3;' onmousedown='createAboutUs()'>About us</a>"+
				"<a href='#' id='labelProducts' style='overflow:hidden;position:absolute;left:38%;top:"+labeltop+"px;z-index:3;' onmousedown='createProducts()'>Products</a>"+
				"<a href='#' id='labelBuy' style='overflow:hidden;position:absolute;left:51%;top:"+labeltop+"px;z-index:3;' onmousedown='createBuy()'>Buy credits</a>"+
				"<a href='#' id='labelContact' style='overflow:hidden;position:absolute;left:68%;top:"+labeltop+"px;z-index:3;' onmousedown='createContact()'>Contact us</a>"+
				"<a href='#' id='labelSitemap' style='overflow:hidden;position:absolute;left:83%;top:"+labeltop+"px;z-index:3;' onmousedown='createSitemap()'>Sitemap</a></div></Div>";
				
			}
			

			function customerlogin(){
				authp = document.getElementById("authDiv");
				authp.innerHTML= "Wrong authentication";
			}
			function custclear(){
				authp = document.getElementById("authDiv");
				authp.innerHTML= "";
			}
			function productsMessage(){
				authp = document.getElementById("prodMessage");
				authp.innerHTML= "Product no more available";
			}
		///////////////
		
			
		/////////////// X-CARE3 FUNCTIONS		
			function createXcare3Home(){
			//fadeOutMain();
			preload(url+xcarepath);
			transition("<IMG src='"+xcarepath+"' id=home width= 100% height= 100%;>");
			//setTimeout('transition(\'<IMG src="'+xcarepath+' " id=home width= 100% height= 100%;>\')',400);
			xcarelink=xcarepath;			
			createXcare3Menu();
			}
			function createXcare3Menu(){
			link="xcareMenu";	
			document.getElementById('NewsDiv').style.visibility = 'hidden';
			document.getElementById('imgDiv').style.visibility = 'hidden';
			document.getElementById('PlayButt').style.visibility = 'hidden';
			document.getElementById('PauseButt').style.visibility = 'hidden';
			
			div = document.getElementById("MENUDIV");			
			div.style.height = '60px';	
			lineHeight = 58;
				
			div.innerHTML = 
			"<IMG src='"+menupath+"' id='ImgMenu' width='100%' height='100%'/>"+
			"<IMG id='back' src='home page/back.png' style='overflow:hidden;position:absolute;left:6px;top:1px;width:60px;height:58px;' onclick='returnHome();createHome()' onMouseOver='backRollover()' onmouseout='backInitial()'/>"+
			"<div id='menu1' style='z-index:3;'>"+
			"<IMG src='"+linepath+"' id='Imgline' style='overflow:hidden;position:absolute;left:"+lineLeft+"px;top:"+lineTop+"px;width:"+lineWidth+"px;height:"+lineHeight+"px;z-index:3;'/>"+
			"<a id='a1' href='#' class='current_page_item' style='overflow:hidden;position:absolute;left:10%;top:28%;z-index:3;' onmousedown='createXcare3Home();createXcare3Menu();'>X-care 3</a>"+
			"<a id='a2' href='#' style='overflow:hidden;position:absolute;left:24%;top:28%;z-index:3;' onmousedown='create(&#39"+im1+"&#39)'>Xenon Krypton</a>"+
			"<a id='a3' href='#' style='overflow:hidden;position:absolute;left:36%;top:28%;z-index:3;' onmousedown='create(&#39"+im2+"&#39)'>Technical specs</a>"+
			"<a id='a4' href='#' style='overflow:hidden;position:absolute;left:49%;top:28%;z-index:3;' onmousedown='create(&#39"+im3+"&#39)'>Menu details</a>"+
			"<a id='a5' href='#' style='overflow:hidden;position:absolute;left:60%;top:28%;z-index:3;' onmousedown='create(&#39"+im4+"&#39)' >Hand piece</a>"+
			"<a id='a6' href='#' style='overflow:hidden;position:absolute;left:69%;top:28%;z-index:3;' onmousedown='create(&#39"+im5+"&#39)'>Network</a>"+
			"<a id='a7' href='#' style='overflow:hidden;position:absolute;left:76%;top:28%;z-index:3;' onmousedown='create(&#39"+im6+"&#39)' >Treatements & results</a>"+
			"<a id='a8' href='#' style='overflow:hidden;position:absolute;left:92%;top:28%;z-index:3;' onmousedown='create(&#39"+im7+"&#39)'>Downloads</a></div>";	
			}
			function setDownloadsMap(name){
			if (name == (xcare3URL+im7)){
				document.getElementById('MAIN').innerHTML = 
				"<IMG src="+name+" id=home width= 100% height= 100% USEMAP='#map1' border=0>"+
				"<MAP NAME='map1'>"+
				"<AREA HREF='brochure.pdf' ALT='Download PDF English' TITLE='PDF English' SHAPE=RECT COORDS="+mx1+","+my1+","+mx2+","+my2+">"+
				"<AREA HREF='javascript:setVideo()' ALT='Download Video' TITLE='FLASH video' SHAPE=RECT COORDS="+vx1+","+vy1+","+vx2+","+vy2+">"				+
				"<AREA HREF='brochure Arabic.pdf' ALT='Download PDF Arabic' TITLE='PDF Arabic' SHAPE=RECT COORDS="+bx1+","+by1+","+bx2+","+by2+">"+
				"<AREA HREF='javascript:setVideo2()' ALT='Download Presentation' TITLE='FLASH presentation' SHAPE=RECT COORDS="+px1+","+py1+","+px2+","+py2+">"						
				+
				"</MAP>";
			}	
			}
			function create(name){
			xcarelink="";
			preload(url+xcare3URL+name);
			transition("<IMG src="+xcare3URL+name+" id=home width= 100% height= 100%>");
			//setTimeout('transition(\'<IMG src=x-care3/site/'+name+ ' id=home width= 100% height= 100% style="opacity:1;filter:alpha(opacity=100)">\')',400);
			xcarelink=xcare3URL+name;
			
			name = xcare3URL + name ;
			setDownloadsMap(name);
			
			for (i = 0; i< Xcare_a.length; i++){
				elem=document.getElementById(Xcare_a[i]);
				elem.className = "";
			}			
				elemc=document.getElementById(getEvent(event).target.id.replace('p',''));
				elemc.className = 'current_page_item';
			}
			function setxcareImg(name){
				document.getElementById('MAIN').innerHTML = "<IMG src='"+name+"'id='homeImg' width= 100% height=100%>";
				setDownloadsMap(name);			
			}			
			function setVideo(){
			window.open("video.htm",'name','height=410,width=400,left=100,top=100,resizable=yes,scrollbars=0');
			}
			function setVideo2(){
			window.open("video2.htm",'name','height=410,width=400,left=100,top=100,resizable=yes,scrollbars=0');
			}	
	
		///////////////
			
						

		/////////////// NEWS DIV FUNCTIONS
			function nextNews(){
				nIndex++;
				if (nIndex >= newstexts.length) {nIndex = 0;}
				elem = document.getElementById('vmarquee');
				formatNews(elem,nIndex);
			}
			function prevNews(){
				nIndex--;
				if (nIndex <0) {nIndex = newstexts.length-1;}
				elem = document.getElementById('vmarquee');
				formatNews(elem,nIndex);
			}
			
			var m_iInterval=0;
			function pause() {	
			  clearInterval(m_iInterval);
			  state=0;			  
			}
			function resume() {	
			  clearInterval(m_iInterval);
			  m_iInterval = setInterval(nextNews, 5000);
			  state=1;
			}
			function setplay(){
				elem = document.getElementById('PlayButt');
				elem.style.visibility='visible';
				elem = document.getElementById('PauseButt');
				elem.style.visibility='hidden';
			}
			function setpause(){
				elem = document.getElementById('PlayButt');
				elem.style.visibility='hidden';	
				elem = document.getElementById('PauseButt');
				elem.style.visibility='visible';
			}
			function formatNews(elem,i){
				elem.style.padding='4px';
				elem.innerHTML="<p style='text-align:center;font-size:1em; font-weight:bold;color:#666666;'>"+newsheads[i]+"</p><a href="+newslinks[i]+" target='_blank' style='margin:5px 5px 5px 5px;line-height:20px;text-decoration:none;'>"+ newstexts[i]+"</a>";
			}
		///////////////



		/////////////// OTHER FUNCTIONS
			function getlink(){
				if (link== "createhome"){					
					createBody();
				}
				else if (link== "home"){
					createHome();
				}
				else if (link== "About us"){
					createAboutUs();
				}
				else if (link== "Products"){
					createProducts();
				}
				else if (link== "Buy credits"){
					createBuy();
				}
				else if (link== "Contact us"){
					createContact();
				}
				else if (link== "sitemap"){
					createSitemap();
					
				}
				else if (link== "xcareMenu"){
					createXcare3Menu();
					if (xcarelink == xcarepath) {			
						setxcareImg(xcarelink);
					}
					else if (xcarelink != ""){
						setxcareImg(xcarelink);
					}	
				}			
			}
			function loadBody(){
				getSize();getlink();nextNews();resume();preload(url+homepagepath);testbannerCookie("desc");
			}
			function resize(){
				getSize();getlink();nIndex--;nextNews();
			}
			function preload(loadimg){
				LoadingVisibility = "visible";
				MainVisibility = "hidden";
				document.getElementById('MAIN').style.visibility = "hidden";
				document.getElementById('Loading').style.visibility = "visible";												
				img = new Image();
				img.src = loadimg;
				if (img.complete) {
						LoadingVisibility = "hidden";
						MainVisibility = "visible";
						document.getElementById('MAIN').style.visibility = "visible";
						document.getElementById('Loading').style.visibility = "hidden";
				}
				img.onload = function(){
					LoadingVisibility = "hidden";
					MainVisibility = "visible";
					document.getElementById('MAIN').style.visibility = "visible";
					document.getElementById('Loading').style.visibility = "hidden";
				}
			}
			function getEvent (e) {
			  var event = e || window.event;
			  if( ! event.target ) {
			    event.target = event.srcElement
			      }
			  return event;
			}
			function backRollover(){
				document.getElementById('back').style.left='2px';
			}
			function backInitial(){
				document.getElementById('back').style.left='8px';
			}
			
			var bannerHeigth= -30;
			var bannerHeigth2= 0;
			function testbannerCookie(mode){
				if (Get_Cookie('banner')) {
					division = document.getElementById("Banner");
					division.style.width="99%";
				}
				else {
					moveBanner(mode);
					//Set_Cookie("banner", "done", true);				
				}
			}
			function moveBanner(mode){
				division = document.getElementById('Banner');
				if (mode == "desc") {
					bannerHeigth += 3;
					division.style.top = bannerHeigth + "px";
					if (bannerHeigth < -1) {
						setTimeout("moveBanner('desc')", 40);
					}
				}
				else if(mode=="asc"){
					bannerHeigth -= 3;
					division.style.top = bannerHeigth + "px";
					if (bannerHeigth > -40) {
					setTimeout("moveBanner('asc')", 40);
				}
					else{
					division.style.width="98%";
					}
				}
			}
			
		///////////////
			

		////////////// cookies
			function Set_Cookie( name, value, expires){
				var today = new Date();
				today.setTime( today.getTime() );

				if ( expires )
				{
				expires = expires * 1000 * 60 * 60 * 24;
				}				
				var expires_date = new Date( today.getTime() + (1000 * 60 * 60 * 24 * 30));
				
				
				document.cookie = name + "=" +escape( value ) +
				( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" );
			} 
			function Get_Cookie( check_name ) {
				var a_all_cookies = document.cookie.split( ';' );
				var a_temp_cookie = '';
				var cookie_name = '';
				var cookie_value = '';
				var b_cookie_found = false; 
			
				for ( i = 0; i < a_all_cookies.length; i++ )
				{
				
					a_temp_cookie = a_all_cookies[i].split( '=' );
			
					cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
			
					if ( cookie_name == check_name )
					{
						b_cookie_found = true;
						if ( a_temp_cookie.length > 1 )
						{
							cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
						}
						return cookie_value;
						break;
					}
					a_temp_cookie = null;
					cookie_name = '';
				}
				if ( !b_cookie_found )
				{
					return null;
				}
			}
			function Delete_Cookie( name) {
			if ( Get_Cookie( name ) ) document.cookie = name + "=" +
			";expires=Thu, 01-Jan-1970 00:00:01 GMT";
			}
			function testdelete(){
				Delete_Cookie('banner');
				( Get_Cookie( 'banner' ) ) ? alert( Get_Cookie('banner')) :
				alert( 'cookie deleted');
			}
		//////////////
		
		
		
		
		
		///////////////////
		//ADMIN PART			
		function login(){
		elem = document.getElementById('pass');		
		if (elem.value == 'password') {
			setAdminContent();
		}				
		}
		function setAdminContent(){
			htm= document.getElementById('content');
			str = '<table border=1 cellpadding=10 ><tr><td>News Header</td><td>News Link</td><td>News Text</td></tr>';
			for (x = 0; x < newsheads.length; x++) {
				if (newsheads[x] != null) {			
				str += '<tr><td>' + newsheads[x] + '</td><td>' + newslinks[x] + '</td><td>' + newstexts[x] +
				'</td><td><input type=checkbox id="' +
				x +
				'" ></td></tr>';
				}
				if(x == newsheads.length-1){str+='</table></br></br>';}
			}
						
			str+= '<a href="javascript:deleteNews()">Delete News</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</br></br>';
			str+= 'News Header:</br> <input type=text id="txtHead" size = 30></br>';
			str+= 'News Link: </br><input type=text id="txtLink" size = 30></br>';
			str+= 'News Text: </br><textarea id="txtText" cols= 30 rows= 10></textarea></br></br>';
			str+= '<a href="javascript:addNews()">Add News</a>';
			htm.innerHTML = str;			
		}
		function deleteNews(){
			for (x = 0; x < newsheads.length; x++) {
				if (newsheads[x] != null) {
					if (document.getElementById(x).checked) {
						newsheads[x] = null;
						newslinks[x] = null;
						newstexts[x] = null;
					}
				}	
			}
			setAdminContent();
		}
		function addNews(){
			elem = document.getElementById('txtHead');
			elem1 = document.getElementById('txtLink');
			elem2 = document.getElementById('txtText');
			if(elem.value != '' && elem1.value != '' && elem2.value != '') { 
				newsheads[newsheads.length] = elem.value;
				newslinks[newslinks.length] = elem1.value;
				newstexts[newstexts.length] = elem2.value;	
				
				setAdminContent();				
			 }

		}
		///////////////
