<!--

function OpenWindow( path, conf ){
        win = window.open( path, '', conf );
}

function CheckAll(elm,name){
  for (var i = 0; i < elm.form.elements.length; i++)
          if (elm.form.elements[i].name.indexOf(name) == 0)
            elm.form.elements[i].checked = elm.checked;
}

function n_window(theurl)
{
 // set the width and height
 var the_width=200;
 var the_height=200;
 // set window position
 var from_top=20;
 var from_left=20;
 // set other attributes
 var has_toolbar='yes';
 var has_location='yes';
 var has_directories='yes';
 var has_status='yes';
 var has_menubar='yes';
 var has_scrollbars='yes';
 var is_resizable='yes';
 // attributes put together
 var the_atts='width='+the_width+',height='+the_height+',top='+from_top+',screenY='+from_top+',left='+from_left+',screenX='+from_left;
 the_atts+=',toolbar='+has_toolbar+',location='+has_location+',directories='+has_directories+',status='+has_status;
 the_atts+=',menubar='+has_menubar+',scrollbars='+has_scrollbars+',resizable='+is_resizable;
 // open window
 window.open(theurl,'',the_atts);
}

function ShowPhoto( photoPath, photoNum, activeButtonPath, buttonCount, vipButtonCount, isVip )
{

        document.bigimg.src = photoPath;

        // prostije photo
        switch( buttonCount )
        {
                case 1:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                break;
                case 2:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                        document.photo2.src="images/user-buttons-photos_not-active2.gif";
                break;
                case 3:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                        document.photo2.src="images/user-buttons-photos_not-active2.gif";
                        document.photo3.src="images/user-buttons-photos_not-active3.gif";
                break;
                case 4:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                        document.photo2.src="images/user-buttons-photos_not-active2.gif";
                        document.photo3.src="images/user-buttons-photos_not-active3.gif";
                        document.photo4.src="images/user-buttons-photos_not-active4.gif";
                break;
                case 5:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                        document.photo2.src="images/user-buttons-photos_not-active2.gif";
                        document.photo3.src="images/user-buttons-photos_not-active3.gif";
                        document.photo4.src="images/user-buttons-photos_not-active4.gif";
                        document.photo5.src="images/user-buttons-photos_not-active5.gif";
                break;
        }
/*
        // esli vip
        switch( vipButtonCount )
        {
                case 1:
                        document.vipphoto1.src="images/user-buttons-photos_not-active-vip1.gif";
                break;
                case 2:
                        document.vipphoto1.src="images/user-buttons-photos_not-active-vip1.gif";
                        document.vipphoto2.src="images/user-buttons-photos_not-active-vip2.gif";
                break;
        }
*/
        photoNum.src = activeButtonPath;
/*
        document.bigimg.src = photoPath;

        // vip?
        if ( !isVip )
        {
        switch(vipButtonCount)
        {
                case 1:
                        document.vipphoto1.src="images/user-buttons-photos_not-active-vip1.gif";
                break;
                case 2:
                        document.vipphoto1.src="images/user-buttons-photos_not-active-vip1.gif";
                        document.vipphoto2.src="images/user-buttons-photos_not-active-vip2.gif";
                break;
        }

        switch( buttonCount )
        {
                case 1:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                break;
                case 2:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                        document.photo2.src="images/user-buttons-photos_not-active2.gif";
                break;
                case 3:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                        document.photo2.src="images/user-buttons-photos_not-active2.gif";
                        document.photo3.src="images/user-buttons-photos_not-active3.gif";
                break;
                case 4:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                        document.photo2.src="images/user-buttons-photos_not-active2.gif";
                        document.photo3.src="images/user-buttons-photos_not-active3.gif";
                        document.photo4.src="images/user-buttons-photos_not-active4.gif";
                break;
                case 5:
                        document.photo1.src="images/user-buttons-photos_not-active1.gif";
                        document.photo2.src="images/user-buttons-photos_not-active2.gif";
                        document.photo3.src="images/user-buttons-photos_not-active3.gif";
                        document.photo4.src="images/user-buttons-photos_not-active4.gif";
                        document.photo5.src="images/user-buttons-photos_not-active5.gif";
                break;
        }
        }
        // esli vip
        else
        {
        switch( vipButtonCount )
        {
                case 1:
                        document.vipphoto1.src="images/user-buttons-photos_not-active-vip1.gif";
                break;
                case 2:
                        document.vipphoto1.src="images/user-buttons-photos_not-active-vip1.gif";
                        document.vipphoto2.src="images/user-buttons-photos_not-active-vip2.gif";
                break;
        }
        }

        photoNum.src = activeButtonPath;
*/
}

function OpenPhotoWindow( path, conf, w, h ){
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winConf = 'height='+h+',width='+w+',top='+wint+',left='+winl + "," + conf;
        window.open(path,"",winConf);
}

function InsertSmile( smile ) {    
        
	var input = window.document.getElementById( 'mailmessage' );
    var smileText = new String( smile );
        
    input.focus();
        
    if( input.createTextRange ) 
	{
    	document.selection.createRange().text += smileText;
        
    } 
	else if( input.setSelectionRange )
	{
		var len = input.selectionEnd;
        input.value = input.value.substr( 0, len ) + smileText + input.value.substr( len );              
        input.setSelectionRange( len + smileText.length, len + smileText.length );
	} 
	else input.value += smileText;

}

function IsUSA( obj, form )
{
	if ( obj.value == 1 && obj.value != "" ) document.getElementById('state').disabled = false;
	else document.getElementById('state').disabled = true;
}

-->
