//#####################################################
//#####################################################
//##### 	    Author: Dejan Jokic				  #####
//#####  Profession: Web Developer / Programmer	  #####
//#####___________________________________________#####
//#####################################################
//#####################################################


// set form variables
function set_fFieldValue(fForm, fField, fValue){
	fForm.elements[fField].value=fValue;
}

// Email Validation. Written by PerlScriptsJavaScripts.com
function check_email(e) {
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){ 
			return (false);
		}	
	} 

	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) {
			return (-1);		
		} 
	}
}

// change select function
//****************************************************
function fChangeSelect(fForm,fField){
	//alert (fForm,fField)
	if(fForm.elements[fField].selectedIndex > -1){
	    fForm.submit();
	}
}
//****************************************************


var MultiMediaPannel;

multiMedia =
{
	/*
	 *
	 *	MultiMedia Object
	 *
	 *	author: herby zueger
	 *	creation: 20080706
	 *	
	 *	version: 0.9 - initial version
	 *	
	 *	last update: 20081028 (shz)
	 *	
	 */

	video:
	{
		/*
		 * creation object video
		 *	
		 *
		 *
		 */
		 
		open:function( name )
		{
			/*
			 *
			 *	creating methode open
			 *
			 *	
			 */			
	
			try
			{
				/* check if pannel is already open, if it is, close it */
				if(MultiMediaPannel)
				{
					 MultiMediaPannel.close();
				}
				
			}
			catch(err)
			{
				//no error handling in this case
			}
			
			/* getting x and y coordinates to place the MultimediaBox on the center of the screen */
			xPos = (window.screen.width/2) - (688/2)
			yPos = (window.screen.height/2) - (426/2)

			/* open the window with the movie */
			MultiMediaPannel = window.open('/video/'+name+'.html','MultiMediaBoxVideo','width=688, height=426');
			MultiMediaPannel.moveTo(xPos,yPos)
			MultiMediaPannel.focus();
		}		
	}
}

/*  VHZ 20100331 */
var domainID = 0;
var langID = 1;
var siteID = 31001; // CH
var includeSiteID = 30002
var country = "ch"
function setMouseOverStyles( obj )
{
 obj.className='mouseOverStyles' 
}
function setMouseOutStyles( obj )
{
 obj.className='mouseOutStyles' 
}
function openShopAt( ContentMenuItemID )
{
 var pos = domainID+":"+siteID +":"+includeSiteID+":"+ContentMenuItemID+":"+langID;
 
 var shopWindow = window.open("https://shop.bossard.com/"+country+"/index.cfm?app_page=" + pos )
 
 shopWindow.focus()
}