   function rozwin(co){
with(document.getElementById(co)){className=className=='h'?'v':'h';}
   };

function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}



function set_page_title(title)
 {
document.title = title + " - Polish SolidWorks User Group";
return true;
      }

function set_page_opis(title, tag)
 {
 
metatags = document.getElementsByTagName("meta");
    // Iterate through the array, listing them all
    // Update only the Title meta tag
  
  for (cnt = 0; cnt < metatags.length; cnt++)

    {
	
        var name = metatags[cnt].getAttribute("name");
        var content = metatags[cnt].getAttribute("content");
        // List the original meta tag name=content
        //document.write(name + " = " + content + "");

        // Update the Title meta tag
if (metatags[cnt].getAttribute("name") == "title") 
{ metatags[cnt].setAttribute("content", title + " - Polish SolidWorks User Group");}
else if (metatags[cnt].getAttribute("name") == "Keywords") 
{ metatags[cnt].setAttribute("content", tag );}
 }

return true;

      }
	  
$(document).ready(function(){


/*
  $('#search').click(function() {
    $('div#advance_search_box').toggle(400);
    return false;
  });
  */
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
$('#tabs div').hide(); // Hide all divs 
$('#tabs div:first').show(); // Show the first div 
$('#tabs ul li:first').addClass('active'); // Set the class for active state 
$('#tabs ul li a').click(function(){ // When link is clicked 
$('#tabs ul li').removeClass('active'); // Remove active class from links 
$(this).parent().addClass('active'); //Set parent of clicked link class to active 
var currentTab = $(this).attr('href'); // Set currentTab to value of href attribute 
$('#tabs div').hide(); // Hide all divs 
$(currentTab).show(); // Show div with id equal to variable currentTab 
return false; 
}); 

$("#advance_search_box").hide();

	});
	
function insertAtCursor(myField, myValue) {
		//IE support
		if (document.selection) {
			myField.focus();
			sel = document.selection.createRange();
			sel.text = myValue;
		}
		//MOZILLA/NETSCAPE support
		else if (myField.selectionStart || myField.selectionStart == '0') {
			var startPos = myField.selectionStart;
			var endPos = myField.selectionEnd;
			myField.value = myField.value.substring(0, startPos)
			+ myValue + ''
			+ myField.value.substring(endPos, myField.value.length);
		} else {
			myField.value += myValue;
		}
	}
