/*
 * $Date: 2008-01-31 14:08:54 +0100 (to, 31 jan 2008) $
 * $Author: angu $
 * $Id: head.js 1987 2008-01-31 13:08:54Z angu $ 
 * $Revision: 1987 $ 
 * $HeadURL: svn://lb-leanback/Kunder/Kunder/Rusta/Rusta%20new%20web/script/head.js $
 */
	cb2_off = new Image;
	cb2_on = new Image;
	cb2_off.src = "images/menu/menu_hem.gif";
	cb2_on.src = "images/menu/menu_hem1.gif";

	cb3_off = new Image;
	cb3_on = new Image;
	cb3_off.src = "images/menu/menu_kampanj.gif";
	cb3_on.src = "images/menu/menu_kampanj1.gif";


	function swap(iname, gname) {
		iname.src = gname.src;
	}

		function search(){
			page="default.asp"
			  if(document.textsea.textsearch.value == "") {
				self.location=page
				return false;
			} 
		}	
		
		function go(URL,WIDTH,HEIGHT,WIN) 
		{
 		window.open(URL,WIN,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=' + WIDTH +',height=' + HEIGHT +'');
		}
		
		function News( Filename)
			{
			remote = window.open('', 'InfoService', 'width=550,height=400,resizable=yes,scrollbars=yes');
			if( remote != null)
				{
				if( remote.opener == null)
					remote.opener = self;
				remote.location.href = Filename;
				remote.focus();
				}
			}			
	
		function MoreInfo(product)
			{
			remote = window.open('', 'MeraInfo', 'width=400,height=500,resizable=no,scrollbars=yes');
			if( remote != null)
				{
				if( remote.opener == null)
					remote.opener = self;
				remote.location.href = '/moreinfo.asp?article_id='+product;
				remote.focus();
				}
			}
			
			
		function Np()
			{
			remote_np = window.open('newspapers.asp', 'Sumo_np', 'width=616,height=400,resizable=yes,scrollbars=yes');
			if( remote_np != null)
				{
				remote_np.focus();
				}
			}
			
		function InfoService( QA_ID, INFOSERVICE_ID)
			{
			remote = window.open('', 'InfoService', 'width=550,height=400,resizable=yes,scrollbars=yes');
			if( remote != null)
				{
				if( remote.opener == null)
					remote.opener = self;
				remote.location.href = 'infoservice.asp?qa_id=' + QA_ID + '&infoservice_id=' + INFOSERVICE_ID;
				remote.focus();
				}
			}

		function ViewMovie()
			{
			remote = window.open('movie.asp', 'ViewMovie', 'width=600,height=470,resizable=no,scrollbars=yes');
			if( remote != null)
				{
				remote.focus();
				}
			}

		function ViewMovie2()
			{
			remote = window.open('movie2.asp', 'ViewMovie2', 'width=600,height=470,resizable=no,scrollbars=yes');
			if( remote != null)
				{
				remote.focus();
				}
			}

		function ViewMovie3()
			{
			remote = window.open('movie3.asp', 'ViewMovie3', 'width=600,height=470,resizable=no,scrollbars=yes');
			if( remote != null)
				{
				remote.focus();
				}
			}

		function openCommercial()
		{ //v2.0
			var remote = window.open('http://rusta.leanback.se/index.htm', 'rustacommercials', 'width=600,height=560');
			if( remote != null)
			{
				remote.focus();
			}
		}

		function Info_cookies()
			{
			remote = window.open('cookies_info.asp', 'Info_cookies', 'width=600,height=470,resizable=no,scrollbars=no');
			if( remote != null)
				{
				remote.focus();
				}
			}

		function ViewOneProduct( PRODUCT_ID)
		{
			remote = window.open('', 'product_one', 'width=550,height=400,resizable=no,scrollbars=yes');
			if( remote != null)
			{
				if( remote.opener == null)
					remote.opener = self;
				//remote.location.href = 'product_one.asp?product_id=' + PRODUCT_ID;
				remote.location.href = '/visa-produkt_' + PRODUCT_ID + '.html';
				remote.focus();
			}
		}
		
		function InfoServiceFAQ( QA_ID, INFOSERVICE_ID, INFOSERVICE_PARENT_ID)
			{
			remote = window.open('', 'InfoServiceFAQ', 'width=550,height=400,resizable=yes,scrollbars=yes');
			if( remote != null)
				{
				if( remote.opener == null)
					remote.opener = self;
				remote.location.href = 'infoserviceFAQ.asp?qa_id=' + QA_ID + '&infoservice_id=' + INFOSERVICE_ID + '&infoservice_parent_id=' + INFOSERVICE_PARENT_ID;
				remote.focus();
				}
			}

		function InfoServiceFAQitem( QA_ID, INFOSERVICE_ID, INFOSERVICE_PARENT_ID, INFOSERVICE_CATEGORY_ID)
			{
			remote = window.open('', 'InfoServiceFAQitem', 'width=550,height=400,resizable=yes,scrollbars=yes');
			if( remote != null)
				{
				if( remote.opener == null)
					remote.opener = self;
				remote.location.href = 'infoserviceFAQitem.asp?qa_id=' + QA_ID + '&infoservice_id=' + INFOSERVICE_ID + '&infoservice_parent_id=' + INFOSERVICE_PARENT_ID + '&infoservice_category_id=' + INFOSERVICE_CATEGORY_ID;
				remote.focus();
				}
			}

		function View3D( Filename)
			{
			remoteview = window.open('', '3D', 'width=400,height=400,resizable=no');
			if( remoteview != null)
				{
				if( remoteview.opener == null)
					remoteview.opener = self;
				remoteview.location.href = '/3d.asp?FileName=' + Filename;
//				remoteview.location.href = '/images/products/' + Filename;
				remoteview.focus();
				}
			}
		
		function ViewLarge( Filename)
			{
			remotelarge = window.open('', 'Large', 'width=470,height=600,resizable=no');
			if( remotelarge != null)
				{
				if( remotelarge.opener == null)
					remotelarge.opener = self;
				//remotelarge.location.href = '/large.asp?FileName=' + Filename;
				remotelarge.location.href = '/zoom-bild_' + Filename + '.html';
				remotelarge.focus();
				}
			}
		
		function validate_email()
		{
			str=form_name.email.value;
			filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
			if (filter.test(str)!=true)
			{
				alert("Var vänlig ange din email adress!");
				event.returnValue=false;
			}
		}
