﻿/*-----------------------------------------------------------------------
User JavaScript File

version: 	4.1
author:		sebastian kupke
email:		sebastian.kupke@baral-geohaus.de
website:	http://www.baral.de
-----------------------------------------------------------------------*/

/* =namespace usr
-----------------------------------------------------------------------*/
ws.usr = {
	
	/* =c namespace
	-----------------------------------------------------------------------*/
	c: {
		/* =onload
	    Fired after web sis has been fully loaded. You can access the dom and all js objects.
		-----------------------------------------------------------------------*/
		onload: function() {
			
		}
	},
	
	/* =t namespace (for tools)
	-----------------------------------------------------------------------*/
	t: {
		
		/* =identify
		-----------------------------------------------------------------------*/
		identify: {
		
			/* =end
			 * Fired when the user uses the identify tool
			 * @param point
			-----------------------------------------------------------------------*/
			end: function(point) {
				alert('x: ' + point.x + '\ny: ' + point.y);
			}
		},
		
		/* =selectRect
		-----------------------------------------------------------------------*/
		selectRect: {
		
			/* =end
			 * Fired when the user uses the selectRect tool
			 * @param rect
			-----------------------------------------------------------------------*/
			end: function(rect) {
				alert('rectangle:\nlower left: ' + rect.ll.x + ' ' + rect.ll.y + '\nupper right: ' + rect.ur.x + ' ' + rect.ur.y);
				
				$('#t_select_div').css('z-index', '2200').empty();
			}
		},
		
		/* =selectPolygon
		-----------------------------------------------------------------------*/
		selectPolygon: {
		
			/* =end
			 * Fired when the user uses the selectPolygon tool
			 * @param polygon
			-----------------------------------------------------------------------*/
			end: function(polygon) {
				var pointStr = '';
			    
			    for (var i = 0; i < polygon.points.length; i++) {
			        
			        pointStr += i + '. ' + polygon.points[i].x + ' ' + polygon.points[i].y + '\n';
			    }
			    
			    alert(pointStr + '\ndrag vertexes? ' + polygon.dragVertexes);
			    
			    $('#t_select_div').css('z-index', '2200').empty();
			}
		},
		
		/* =selectCircle
		-----------------------------------------------------------------------*/
		selectCircle: {
		
			/* =end
			 * Fired when the user uses the selectCircle tool
			 * @param circle
			-----------------------------------------------------------------------*/
			end: function(circle) {
				alert('center: ' + circle.center.x + ' ' + circle.center.y + '\nradius: ' + circle.r);
			    
			    $('#t_select_div').css('z-index', '2200').empty();
			}
		}
	},
	
	/* =m namespace (for modules)
	-----------------------------------------------------------------------*/
	m: {
		
	}
	
	
}

function impressum()  {
		
	window.open('../../../user/bauplaetze/pdf/impressum.pdf');
}

function bauplatzinfo() {
		
	ws.i.tst({
		type: 'show',
		header: 'Bauplätze',
		content: 'Die aufgezeigten Daten sind rechtlich unverbindlich. Auskünfte erhalten sie bei den angegebenen Kontaktadressen der Stadtverwaltung Balingen. Die Verkaufsbereitschaft privater Bauplatzeigentümer kann nicht zugesichert werden.<br />Auskünfte über Eigentümer oder Grundstückspreise privater Bauplätze werden aus datenschutzrechtlichen Gründen nicht veröffentlicht.<br />Die Stadtverwaltung Balingen vermittelt zwischen Kaufinteressent und Eigentümer.<br /><a href="../../../user/bauplaetze/pdf/bauplatzanfrage.pdf" target="_blank">Bauplatzanfrage</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../../user/bauplaetze/pdf/aufnahme_in_bauplatzboerse.pdf" target="_blank">Aufnahme in die Bauplatzbörse</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../../user/bauplaetze/pdf/widerspruch_veroeffentlichung.pdf" target="_blank">Widerspruch Veröffentlichung</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../../user/bauplaetze/pdf/impressum.pdf" target="_blank">Impressum</a>'
	});
}
















